forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake [KILL 3-STATE]: Switch
WITH_CCACHE
to boolean
`WITH_CCACHE` is an opportunistic option now and its default is `ON`.
- Loading branch information
Showing
5 changed files
with
28 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright (c) 2023-present The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or https://opensource.org/license/mit/. | ||
|
||
if(NOT MSVC) | ||
find_program(CCACHE_EXECUTABLE ccache) | ||
if(CCACHE_EXECUTABLE) | ||
execute_process( | ||
COMMAND readlink -f ${CMAKE_CXX_COMPILER} | ||
OUTPUT_VARIABLE compiler_resolved_link | ||
ERROR_QUIET | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
if(CCACHE_EXECUTABLE STREQUAL compiler_resolved_link) | ||
set(WITH_CCACHE "ccache masquerades as the compiler") | ||
elseif(WITH_CCACHE) | ||
list(APPEND CMAKE_C_COMPILER_LAUNCHER ${CCACHE_EXECUTABLE}) | ||
list(APPEND CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_EXECUTABLE}) | ||
endif() | ||
else() | ||
set(WITH_CCACHE OFF) | ||
endif() | ||
endif() | ||
|
||
mark_as_advanced(CCACHE_EXECUTABLE) |
This file was deleted.
Oops, something went wrong.