Skip to content

Commit

Permalink
Merge #298: cmake: Implement prefix maps
Browse files Browse the repository at this point in the history
fce102f fixup! cmake: Add `ccache` support (Hennadii Stepanov)

Pull request description:

  This PR implements the following Autotools functionality: https://github.com/hebasto/bitcoin/blob/f63b2002a1dcb53178626147d61bfd290e63d65b/configure.ac#L1481-L1484

  Fixes #297.

Top commit has no ACKs.

Tree-SHA512: 0fcadc62cc864567c7726a5173702199a4bfec152cff1d33b9839efbfb22f9c63a67521ea537b1632521206f1ec9a296806128f47bc297cf3700814a319c970e
  • Loading branch information
hebasto committed Aug 3, 2024
2 parents f63b200 + fce102f commit 30ac8c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmake/ccache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ if(NOT MSVC)
list(APPEND CMAKE_C_COMPILER_LAUNCHER ${CCACHE_EXECUTABLE})
list(APPEND CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_EXECUTABLE})
endif()
try_append_cxx_flags("-fdebug-prefix-map=A=B" TARGET core_interface SKIP_LINK
IF_CHECK_PASSED "-fdebug-prefix-map=${PROJECT_SOURCE_DIR}=."
)
try_append_cxx_flags("-fmacro-prefix-map=A=B" TARGET core_interface SKIP_LINK
IF_CHECK_PASSED "-fmacro-prefix-map=${PROJECT_SOURCE_DIR}=."
)
else()
set(WITH_CCACHE OFF)
endif()
Expand Down

0 comments on commit 30ac8c3

Please sign in to comment.