Skip to content

Commit 8bf600c

Browse files
committed
COMP: Remove non-functional CCACHE_BASEDIR setting from ITK_USE_CCACHE
set(ENV{CCACHE_BASEDIR}) only mutates the configure-time CMake process environment, so it never reached the compiler invocations run at build time. Remove it and leave the CCACHE_* environment variables for the developer to set per build tree.
1 parent 5573a89 commit 8bf600c

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

CMake/itkCCacheSupport.cmake

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ if(ITK_USE_CCACHE)
4242
message(STATUS "ccache version: ${CCACHE_VERSION} at ${CCACHE_EXECUTABLE}")
4343
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
4444
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
45-
# ccache hashes absolute source and include paths into the cache key.
46-
# ITK developers utilizing ccache often will be using git worktrees
47-
# where the absolute paths differ, producing cache misses.
48-
# By setting CCACHE_BASEDIR, increased cache hits occur based on
49-
# hits relative to the ITK_SOURCE_DIR.
50-
# Export CCACHE_BASEDIR for all build commands to the base of the
51-
set(ENV{CCACHE_BASEDIR} "${ITK_SOURCE_DIR}")
52-
message(STATUS "Set CCACHE_BASEDIR = $ENV{CCACHE_BASEDIR}")
5345
else()
5446
message(FATAL_ERROR "ccache not found, turn off ITK_USE_CCACHE")
5547
endif()

0 commit comments

Comments
 (0)