sccache is autodetected now - optional in presets
This commit is contained in:
parent
7b556b33f8
commit
4c2e75b585
@ -1,14 +1,19 @@
|
||||
cmake_minimum_required(VERSION 3.23)
|
||||
|
||||
# Find CCache
|
||||
# Find SCCache or CCache
|
||||
if (NOT CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache")
|
||||
find_program(SCCACHE_PATH sccache)
|
||||
if(SCCACHE_PATH)
|
||||
message(STATUS "Using SCCache at ${SCCACHE_PATH}")
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${SCCACHE_PATH})
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE_PATH})
|
||||
else()
|
||||
find_program(CCACHE_PATH ccache)
|
||||
if(CCACHE_PATH)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PATH}")
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PATH}")
|
||||
message(STATUS "Using CCache")
|
||||
else()
|
||||
message(STATUS "Not using CCache")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -18,6 +23,7 @@ if(CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache")
|
||||
else()
|
||||
set(STAR_CCACHE FALSE)
|
||||
set(STAR_PRECOMPILED_HEADERS TRUE)
|
||||
message(STATUS "Not using CCache")
|
||||
endif()
|
||||
|
||||
project(starbound)
|
||||
|
@ -16,8 +16,6 @@
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceParentDir}/install",
|
||||
"VCPKG_OVERLAY_TRIPLETS": "${sourceParentDir}/triplets",
|
||||
"CMAKE_VERBOSE_MAKEFILE": true,
|
||||
"CMAKE_C_COMPILER_LAUNCHER": "sccache",
|
||||
"CMAKE_CXX_COMPILER_LAUNCHER": "sccache",
|
||||
"BUILD_TESTING": true,
|
||||
"STAR_ENABLE_STEAM_INTEGRATION": true,
|
||||
"STAR_ENABLE_DISCORD_INTEGRATION": true
|
||||
|
Loading…
Reference in New Issue
Block a user