Skip to content

Commit

Permalink
GraphBLAS: Generate GB_JITpackage.c only if included files have cha…
Browse files Browse the repository at this point in the history
…nged.
  • Loading branch information
mmuetzel committed Dec 19, 2023
1 parent eb19164 commit 72dd65e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions GraphBLAS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ( )

Expand Down Expand Up @@ -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 ( )
Expand Down
7 changes: 5 additions & 2 deletions GraphBLAS/JITpackage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ file ( GLOB GRB_SOURCE_FILES
"../CUDA/JitKernels/*h"
"../Source/Shared/*.h" )

add_custom_target ( grb_jitpackage_source ALL
COMMAND $<TARGET_FILE:grb_jitpackage> ${GRB_SOURCE_FILES}
add_custom_command ( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/GB_JITpackage.c
COMMAND $<TARGET_FILE:grb_jitpackage>
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 )

0 comments on commit 72dd65e

Please sign in to comment.