diff options
author | niranjan <niranjan.nilakantan@hotmail.com> | 2023-05-25 00:33:46 (GMT) |
---|---|---|
committer | niranjan <niranjan.nilakantan@hotmail.com> | 2023-05-25 00:33:46 (GMT) |
commit | 029d3dddd4ba2788c5203490e63a24c02328bff8 (patch) | |
tree | c92b1c18c4fa5ee7f360a3d93da67dc611239580 /googletest/cmake | |
parent | e032d57642d2a042b9445b2199277bb24fee2eb5 (diff) | |
download | googletest-029d3dddd4ba2788c5203490e63a24c02328bff8.zip googletest-029d3dddd4ba2788c5203490e63a24c02328bff8.tar.gz googletest-029d3dddd4ba2788c5203490e63a24c02328bff8.tar.bz2 |
Disable some warnings for IntelLLVM on Windows.refs/pull/4256/head
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;
```
Diffstat (limited to 'googletest/cmake')
-rw-r--r-- | googletest/cmake/internal_utils.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index f45a3be..e7927a3 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -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") |