cmake: Replace /Zi with /Z7 for sccache support

Also allows better parallelization since there's no contention on a PDB
file with compiling.
This commit is contained in:
Florent Castelli 2017-06-15 18:24:41 +02:00 committed by Léo Lam
parent 712b078a5b
commit 6910fab63f
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,7 @@
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
foreach(f CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if("${${f}}" MATCHES "/Zi")
string(REGEX REPLACE "/Zi" "/Z7" "${f}" "${${f}}")
endif()
endforeach()
endif()

View File

@ -10,6 +10,8 @@ set(CMAKE_OSX_ARCHITECTURES "x86_64")
# handle configuration options # handle configuration options
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12.0" CACHE STRING "") set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12.0" CACHE STRING "")
set(CMAKE_USER_MAKE_RULES_OVERRIDE "CMake/FlagsOverride.cmake")
project(dolphin-emu) project(dolphin-emu)
# Name of the Dolphin distributor. If you redistribute Dolphin builds (forks, # Name of the Dolphin distributor. If you redistribute Dolphin builds (forks,