Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/CMakeLists.txt
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-03-09 09:49:00 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-03-09 09:49:00 +1100
commit4c2e75b585ef366c6744b5e4e303c0fddff1fefd (patch)
tree1af72eb4fe6fbc53fa926fa9b6aa933a050e8506 /source/CMakeLists.txt
parent7b556b33f8f7aed94b3e706783dfe9e37497896a (diff)
sccache is autodetected now - optional in presets
Diffstat (limited to 'source/CMakeLists.txt')
-rw-r--r--source/CMakeLists.txt20
1 files changed, 13 insertions, 7 deletions
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 770c82e..6ed5bb5 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -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(CCACHE_PATH ccache)
- if(CCACHE_PATH)
- set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PATH}")
- set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PATH}")
- message(STATUS "Using 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()
- message(STATUS "Not using CCache")
+ 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")
+ 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)