mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
Mark ccache as required if ENABLE_CCACHE is ON, set ENABLE_CCACHE to ON by dafault instead of setting it in CMakePresets.json
This commit is contained in:
parent
510fb205e7
commit
c5378f560e
@ -82,7 +82,7 @@ endif()
|
|||||||
# On Linux, use -DCMAKE_CXX_COMPILER_LAUNCHER=ccache instead.
|
# On Linux, use -DCMAKE_CXX_COMPILER_LAUNCHER=ccache instead.
|
||||||
# The iOS and MSVC builds each require some configuration, which is enabled by the following option:
|
# The iOS and MSVC builds each require some configuration, which is enabled by the following option:
|
||||||
if(APPLE_IOS OR MSVC)
|
if(APPLE_IOS OR MSVC)
|
||||||
option(ENABLE_CCACHE "Speed up recompilation by caching previous compilations" OFF)
|
option(ENABLE_CCACHE "Speed up recompilation by caching previous compilations" ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Allow to pass package name from Travis CI
|
# Allow to pass package name from Travis CI
|
||||||
@ -230,7 +230,7 @@ if(APPLE_IOS)
|
|||||||
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
|
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
|
||||||
|
|
||||||
if(ENABLE_CCACHE)
|
if(ENABLE_CCACHE)
|
||||||
find_program(CCACHE "ccache")
|
find_program(CCACHE ccache REQUIRED)
|
||||||
if(CCACHE)
|
if(CCACHE)
|
||||||
# https://stackoverflow.com/a/36515503/2278742
|
# https://stackoverflow.com/a/36515503/2278742
|
||||||
# Set up wrapper scripts
|
# Set up wrapper scripts
|
||||||
@ -263,7 +263,7 @@ if(MINGW OR MSVC)
|
|||||||
if(MSVC)
|
if(MSVC)
|
||||||
if(ENABLE_CCACHE)
|
if(ENABLE_CCACHE)
|
||||||
# https://github.com/ccache/ccache/discussions/1154#discussioncomment-3611387
|
# https://github.com/ccache/ccache/discussions/1154#discussioncomment-3611387
|
||||||
find_program(CCACHE ccache)
|
find_program(CCACHE ccache REQUIRED)
|
||||||
if (CCACHE)
|
if (CCACHE)
|
||||||
file(COPY_FILE
|
file(COPY_FILE
|
||||||
${CCACHE} ${CMAKE_BINARY_DIR}/cl.exe
|
${CCACHE} ${CMAKE_BINARY_DIR}/cl.exe
|
||||||
|
@ -122,8 +122,7 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
|
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
|
||||||
"CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
|
"CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
|
||||||
"FORCE_BUNDLED_MINIZIP": "ON",
|
"FORCE_BUNDLED_MINIZIP": "ON"
|
||||||
"ENABLE_CCACHE": "ON"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -229,8 +228,7 @@
|
|||||||
"description": "VCMI iOS release using Conan and ccache",
|
"description": "VCMI iOS release using Conan and ccache",
|
||||||
"inherits": "ios-release-conan",
|
"inherits": "ios-release-conan",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"ENABLE_PCH" : "OFF",
|
"ENABLE_PCH" : "OFF"
|
||||||
"ENABLE_CCACHE": "ON"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user