Disable some warnings for IntelLLVM on Windows.
Use /fp:precise to override IntelLLVM's default of /fp:fast. This makes IsInf and IsNan work as expected by googletest. ``` [build]...\googletest\googlemock\test\gmock-function-mocker_test.cc(143,21): error: 'VoidReturning' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] [build] MOCK_METHOD(void, VoidReturning, (int n)); // NOLINT ``` ``` [build] ...\googletest\googlemock\test\gmock-function-mocker_test.cc(182,20): error: exception specification of overriding function is more lax than base version [-Werror,-Wmicrosoft-exception-spec] [build] MOCK_METHOD(int, CTNullary, (), (Calltype(STDMETHODCALLTYPE))); ``` ``` [build] ...\googletest\googletest\test\googletest-death-test-test.cc(209,5): error: unused function 'DieInCRTDebugElse12' [-Werror,-Wunused-function] [build] int DieInCRTDebugElse12(int* sideeffect) { [build] ^ ``` ``` [build] ...\googletest\googletest\test\gtest_unittest.cc(4096,7): error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable] [build] int n = 0; ```
This commit is contained in:
parent
e032d57642
commit
029d3dddd4
@ -94,6 +94,9 @@ macro(config_compiler_and_linker)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set(cxx_base_flags "${cxx_base_flags} -utf-8")
|
||||
endif()
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
|
||||
set(cxx_base_flags "${cxx_base_flags} /fp:precise -Wno-inconsistent-missing-override -Wno-microsoft-exception-spec -Wno-unused-function -Wno-unused-but-set-variable")
|
||||
endif()
|
||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR
|
||||
CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
|
||||
set(cxx_base_flags "-Wall -Wshadow -Wconversion -Wundef")
|
||||
|
Loading…
Reference in New Issue
Block a user