Skip to content

Commit

Permalink
Allow jit compilation when using a splayed CUDA toolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Apr 3, 2024
1 parent 2584fd9 commit d07e0cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cpp/cmake/Modules/JitifyPreprocessKernels.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ target_link_libraries(jitify_preprocess PUBLIC ${CMAKE_DL_LIBS})
function(jit_preprocess_files)
cmake_parse_arguments(ARG "" "SOURCE_DIRECTORY" "FILES" ${ARGN})

foreach(inc IN LISTS libcudacxx_raw_includes)
list(APPEND libcudacxx_includes "-I${inc}")
set(includes )
foreach(inc IN LISTS libcudacxx_raw_includes CUDAToolkit_INCLUDE_DIRS)
list(APPEND includes "-I${inc}")
endforeach()
foreach(ARG_FILE ${ARG_FILES})
set(ARG_OUTPUT ${CUDF_GENERATED_INCLUDE_DIR}/include/jit_preprocessed_files/${ARG_FILE}.jit.hpp)
Expand All @@ -44,7 +45,7 @@ function(jit_preprocess_files)
$<TARGET_FILE:jitify_preprocess> ${ARG_FILE} -o
${CUDF_GENERATED_INCLUDE_DIR}/include/jit_preprocessed_files -i -m -std=c++17
-remove-unused-globals -D_FILE_OFFSET_BITS=64 -D__CUDACC_RTC__ -I${CUDF_SOURCE_DIR}/include
-I${CUDF_SOURCE_DIR}/src ${libcudacxx_includes} -I${CUDAToolkit_INCLUDE_DIRS}
-I${CUDF_SOURCE_DIR}/src ${includes}
--no-preinclude-workarounds --no-replace-pragma-once
COMMENT "Custom command to JIT-compile files."
)
Expand Down

0 comments on commit d07e0cc

Please sign in to comment.