Skip to content

Commit

Permalink
Merge pull request #4256 from niranjan-nilakantan:niranjan-nilakantan…
Browse files Browse the repository at this point in the history
…/issue4255

PiperOrigin-RevId: 536480185
Change-Id: I9bdd65cd18253703abf3cc92b3f354c1f798aa3e
  • Loading branch information
copybara-github committed May 30, 2023
2 parents 4580469 + 029d3dd commit f625681
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions googletest/cmake/internal_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f625681

Please sign in to comment.