mirror of
https://github.com/QuasarApp/QuasarAppLib.git
synced 2025-05-02 20:49:42 +00:00
added ccache for cmake (not work)
This commit is contained in:
parent
41a1250a54
commit
0895999e36
15
.gitignore
vendored
15
.gitignore
vendored
@ -44,3 +44,18 @@ CMakeLists.txt.user*
|
|||||||
|
|
||||||
build/*
|
build/*
|
||||||
*.user*
|
*.user*
|
||||||
|
|
||||||
|
#cmake
|
||||||
|
|
||||||
|
CMakeLists.txt.user
|
||||||
|
CMakeCache.txt
|
||||||
|
CMakeFiles
|
||||||
|
CMakeScripts
|
||||||
|
Testing
|
||||||
|
Makefile
|
||||||
|
cmake_install.cmake
|
||||||
|
install_manifest.txt
|
||||||
|
compile_commands.json
|
||||||
|
CTestTestfile.cmake
|
||||||
|
_deps
|
||||||
|
*_autogen
|
||||||
|
@ -19,4 +19,4 @@ ENDIF(CMAKE_BUILD_TYPE EQUAL Release)
|
|||||||
|
|
||||||
message(QUASARAPP_LIB_OUTPUT_DIR = ${QUASARAPP_LIB_OUTPUT_DIR})
|
message(QUASARAPP_LIB_OUTPUT_DIR = ${QUASARAPP_LIB_OUTPUT_DIR})
|
||||||
|
|
||||||
|
include(cmake/ccache.cmake)
|
||||||
|
28
cmake/ccache.cmake
Normal file
28
cmake/ccache.cmake
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2018-2019 QuasarApp.
|
||||||
|
# Distributed under the lgplv3 software license, see the accompanying
|
||||||
|
# Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
# of this license document, but changing it is not allowed.
|
||||||
|
#
|
||||||
|
|
||||||
|
IF(NOT CCACHE_INCLUDE)
|
||||||
|
SET(CCACHE_INCLUDE True)
|
||||||
|
IF(CMAKE_HOST_SYSTEM_NAME EQUAL Linux)
|
||||||
|
|
||||||
|
execute_process(COMMAND "which" "ccache"
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
RESULT_VARIABLE which_result
|
||||||
|
OUTPUT_VARIABLE BIN)
|
||||||
|
|
||||||
|
IF (${BIN} STREQUAL "")
|
||||||
|
message("ccache disabled for ${PROJECT_NAME}")
|
||||||
|
ELSE()
|
||||||
|
SET(CMAKE_CXX_COMPILER "${BIN} ${CMAKE_CXX_COMPILER}")
|
||||||
|
message("ccache enabled for ${CMAKE_CXX_COMPILER}")
|
||||||
|
|
||||||
|
ENDIF (${BIN} STREQUAL "")
|
||||||
|
|
||||||
|
ENDIF(CMAKE_HOST_SYSTEM_NAME EQUAL Linux)
|
||||||
|
|
||||||
|
ENDIF(NOT CCACHE_INCLUDE)
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user