diff options
author | Copybara-Service <copybara-worker@google.com> | 2023-05-30 19:40:46 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-05-30 19:40:46 (GMT) |
commit | f625681bc4086c35099475f0d17e161f1c6ac9a1 (patch) | |
tree | b2c3352fa3c4f738cef6b8e2ee38bfe5e9c63d4b /googletest | |
parent | 45804691223635953f311cf31a10c632553bbfc3 (diff) | |
parent | 029d3dddd4ba2788c5203490e63a24c02328bff8 (diff) | |
download | googletest-f625681bc4086c35099475f0d17e161f1c6ac9a1.zip googletest-f625681bc4086c35099475f0d17e161f1c6ac9a1.tar.gz googletest-f625681bc4086c35099475f0d17e161f1c6ac9a1.tar.bz2 |
Merge pull request #4256 from niranjan-nilakantan:niranjan-nilakantan/issue4255
PiperOrigin-RevId: 536480185
Change-Id: I9bdd65cd18253703abf3cc92b3f354c1f798aa3e
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/cmake/internal_utils.cmake | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index fa7da4e..a3fb3ca 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -94,12 +94,22 @@ macro(config_compiler_and_linker) if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(cxx_base_flags "${cxx_base_flags} -utf-8") endif() - elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + 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") set(cxx_exception_flags "-fexceptions") set(cxx_no_exception_flags "-fno-exceptions") - set(cxx_strict_flags "-W -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wredundant-decls") + set(cxx_strict_flags "-W -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wcast-align -Winline -Wredundant-decls") set(cxx_no_rtti_flags "-fno-rtti") + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(cxx_strict_flags "${cxx_strict_flags} -Wchar-subscripts") + endif() + if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") + set(cxx_base_flags "${cxx_base_flags} -Wno-implicit-float-size-conversion -ffp-model=precise") + endif() elseif (CMAKE_COMPILER_IS_GNUCXX) set(cxx_base_flags "-Wall -Wshadow -Wundef") if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0) |