Initial commit
This commit is contained in:
19
profiles/msvc_ccache.cmake
Normal file
19
profiles/msvc_ccache.cmake
Normal file
@@ -0,0 +1,19 @@
|
||||
# https://github.com/ccache/ccache/wiki/MS-Visual-Studio#usage-with-cmake
|
||||
|
||||
find_program(ccache_exe ccache)
|
||||
if(ccache_exe)
|
||||
file(COPY_FILE
|
||||
${ccache_exe} ${CMAKE_BINARY_DIR}/cl.exe
|
||||
ONLY_IF_DIFFERENT)
|
||||
|
||||
# By default Visual Studio generators will use /Zi which is not compatible
|
||||
# with ccache, so tell Visual Studio to use /Z7 instead.
|
||||
message(STATUS "Setting MSVC debug information format to 'Embedded'")
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
|
||||
|
||||
set(CMAKE_VS_GLOBALS
|
||||
"CLToolExe=cl.exe"
|
||||
"CLToolPath=${CMAKE_BINARY_DIR}"
|
||||
"UseMultiToolTask=true"
|
||||
)
|
||||
endif()
|
||||
Reference in New Issue
Block a user