Skip to content

Commit

Permalink
try to actually use /Z7
Browse files Browse the repository at this point in the history
  • Loading branch information
Be-ing committed Feb 6, 2021
1 parent 832e974 commit 3203544
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,12 @@ if(MSVC)
message(STATUS "Support for sccache: ${SCCACHE_SUPPORT}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "sccache")
# sccache does not work with /Zi
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE}")
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE}")
else()
# ccache support
find_program(CCACHE_EXECUTABLE "ccache")
Expand Down

0 comments on commit 3203544

Please sign in to comment.