Skip to content

Commit

Permalink
jit_preprocess_files make sure output directory always exists
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Apr 6, 2021
1 parent 84da36f commit 1b0711e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/cmake/Modules/JitifyPreprocessKernels.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

cmake_minimum_required(VERSION 3.18)

file(MAKE_DIRECTORY "${CUDF_GENERATED_INCLUDE_DIR}/include/jit_preprocessed_files")

# Create `jitify_preprocess` executable
project(jitify_preprocess VERSION 2.0 LANGUAGES CXX CUDA)
add_executable(jitify_preprocess "${JITIFY_INCLUDE_DIR}/jitify2_preprocess.cpp")
Expand All @@ -34,11 +32,13 @@ function(jit_preprocess_files)

foreach(ARG_FILE ${ARG_FILES})
set(ARG_OUTPUT ${CUDF_GENERATED_INCLUDE_DIR}/include/jit_preprocessed_files/${ARG_FILE}.jit.hpp)
get_filename_component(jit_output_directory "${ARG_OUTPUT}" DIRECTORY )
list(APPEND JIT_PREPROCESSED_FILES "${ARG_OUTPUT}")
add_custom_command(WORKING_DIRECTORY ${ARG_SOURCE_DIRECTORY}
DEPENDS jitify_preprocess "${ARG_SOURCE_DIRECTORY}/${ARG_FILE}"
OUTPUT ${ARG_OUTPUT}
VERBATIM
COMMAND ${CMAKE_COMMAND} -E make_directory "${jit_output_directory}"
COMMAND jitify_preprocess ${ARG_FILE}
-o ${CUDF_GENERATED_INCLUDE_DIR}/include/jit_preprocessed_files
-v
Expand Down

0 comments on commit 1b0711e

Please sign in to comment.