summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2018-10-31 14:21:08 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2018-11-01 13:49:15 +0200
commitca21cedb849e1b6a0071f62bb7139ea7ebbda6d0 (patch)
tree71e2b40763eeadf16f8a7139cecadff71a897f56 /CMakeLists.txt
parent98e12c721ed65e942e57e14114ec379f053eeac4 (diff)
downloadqtlocation-mapboxgl-ca21cedb849e1b6a0071f62bb7139ea7ebbda6d0.tar.gz
[build] Use clcache in appveyor build
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.txt8
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()