Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requesting a clean build directory also clears Jitify cache #15052

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions cpp/cmake/Modules/JitifyPreprocessKernels.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,18 @@ add_custom_target(
DEPENDS ${JIT_PREPROCESSED_FILES}
COMMENT "Target representing jitified files."
)

# when a user requests CMake to clean the build directory
#
# * `cmake --build <dir> --target clean`
# * `cmake --build <dir> --clean-first`
# * ninja clean
#
# We also remove the jitify2 program cache as well. This ensures that we don't keep older versions
# of the programs in cache
set(cache_path "$ENV{HOME}/.cudf")
if(ENV{LIBCUDF_KERNEL_CACHE_PATH})
set(cache_path "$ENV{LIBCUDF_KERNEL_CACHE_PATH}")
endif()
cmake_path(APPEND cache_path "${CUDF_VERSION}/")
set_target_properties(jitify_preprocess_run PROPERTIES ADDITIONAL_CLEAN_FILES "${cache_path}")
Loading