diff --git a/GraphBLAS/CMakeLists.txt b/GraphBLAS/CMakeLists.txt index 978a4e350..50220e61e 100644 --- a/GraphBLAS/CMakeLists.txt +++ b/GraphBLAS/CMakeLists.txt @@ -275,7 +275,7 @@ if ( BUILD_SHARED_LIBS ) if ( NOT NJIT ) # Make sure compressed sources are built before library - add_dependencies ( GraphBLAS grb_jitpackage_source ) + add_dependencies ( GraphBLAS GB_JITpackage ) endif ( ) endif ( ) @@ -320,7 +320,7 @@ if ( BUILD_STATIC_LIBS ) if ( NOT NJIT ) # Make sure compressed sources are built before library - add_dependencies ( GraphBLAS_static grb_jitpackage_source ) + add_dependencies ( GraphBLAS_static GB_JITpackage ) endif ( ) endif ( ) diff --git a/GraphBLAS/JITpackage/CMakeLists.txt b/GraphBLAS/JITpackage/CMakeLists.txt index 5e300656a..020967ca9 100644 --- a/GraphBLAS/JITpackage/CMakeLists.txt +++ b/GraphBLAS/JITpackage/CMakeLists.txt @@ -24,10 +24,13 @@ file ( GLOB GRB_SOURCE_FILES "../CUDA/JitKernels/*h" "../Source/Shared/*.h" ) -add_custom_target ( grb_jitpackage_source ALL - COMMAND $ ${GRB_SOURCE_FILES} +add_custom_command ( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/GB_JITpackage.c + COMMAND $ + ARGS ${GRB_SOURCE_FILES} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${GRB_SOURCE_FILES} COMMENT "Generating compressed sources for JIT compiler..." ) +add_custom_target ( GB_JITpackage + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/GB_JITpackage.c )