Suppress all clang-target-msvc test warning in CMake and other misc fixes (#1151)
* Fix conditional `char8_t` from `format.h` and fix `-Wunused-result` of [[no_discard]] begin() when in c++17 * Suppress `-Winconsistent-dllimport` when in clang-target-msvc * Suppress warning _CRT_SECURE_NO_WARNINGS in MSVC and -Wdeprecated-declarations Suppress warning _CRT_SECURE_NO_WARNINGS in MSVC and -Wdeprecated-declarations of POSIX functions in Clang target MSVC. Those functions are used by gtest. * Remove FMT_FUNC, mark FMT_API to export
This commit is contained in:
committed by
Victor Zverovich
parent
a6e8ed15c4
commit
f4dfd6e30f
@@ -461,6 +461,10 @@ struct LocaleMock {
|
||||
# ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4273)
|
||||
# ifdef __clang__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Winconsistent-dllimport"
|
||||
# endif
|
||||
|
||||
_locale_t _create_locale(int category, const char* locale) {
|
||||
return LocaleMock::instance->newlocale(category, locale, 0);
|
||||
@@ -473,6 +477,9 @@ void _free_locale(_locale_t locale) {
|
||||
double _strtod_l(const char* nptr, char** endptr, _locale_t locale) {
|
||||
return LocaleMock::instance->strtod_l(nptr, endptr, locale);
|
||||
}
|
||||
# ifdef __clang__
|
||||
# pragma clang diagnostic pop
|
||||
# endif
|
||||
# pragma warning(pop)
|
||||
# endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user