diff options
author | Ander Conselvan de Oliveira <ander.deoliveira@mapbox.com> | 2018-10-31 14:21:08 +0200 |
---|---|---|
committer | Ander Conselvan de Oliveira <ander.deoliveira@mapbox.com> | 2018-11-01 08:30:02 +0200 |
commit | a03425e4d814e5bdd02960ed6b612818deb19130 (patch) | |
tree | 71e2b40763eeadf16f8a7139cecadff71a897f56 /CMakeLists.txt | |
parent | 6d8ff823e3c5682f7956106112ac7bfe49612375 (diff) | |
download | qtlocation-mapboxgl-upstream/anderco-clcache.tar.gz |
[build] Use clcache in appveyor buildupstream/anderco-clcache
clcache is a cache for compiled C and C++ objects similar to ccache but
compatible with Microsoft compilers. Using it should result in faster
builds.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 91b0aa5c1c..a48e2c2b01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,6 +137,14 @@ if(CCACHE_PROGRAM) # Clang also thinks that ccache isn't interactive, so we explicitly need to enable color. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics") endif() +elseif(WIN32) + find_program(CLCACHE_PROGRAM clcache) + if(CLCACHE_PROGRAM) + # clcache doesn't work with external pdb files + # https://github.com/frerich/clcache/issues/30 + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + endif() else() message(STATUS "Can't find ccache — consider installing ccache to improve recompilation performance") endif() |