Skip to content

Commit

Permalink
CMake: Don't enable -Wheader-hygiene for unity builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dscharrer committed Apr 1, 2020
1 parent 9265a07 commit b3af860
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/BuildType.cmake
Expand Up @@ -208,7 +208,6 @@ else(MSVC)
add_cxxflag("-Wextra-semi")
add_cxxflag("-Wformat=2")
add_cxxflag("-Wheader-guard")
add_cxxflag("-Wheader-hygiene")
add_cxxflag("-Winit-self")
add_cxxflag("-Wkeyword-macro")
add_cxxflag("-Wlogical-op")
Expand All @@ -234,6 +233,10 @@ else(MSVC)
add_cxxflag("-Wstring-conversion") # part of -Wconversion
add_cxxflag("-Wenum-conversion") # part of -Wconversion

if(NOT UNITY_BUILD)
add_cxxflag("-Wheader-hygiene")
endif()

if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
add_cxxflag("-Wsign-promo")
add_cxxflag("-Wold-style-cast")
Expand Down

0 comments on commit b3af860

Please sign in to comment.