Skip to content

Commit

Permalink
Properly generate git revision header before usage (NVIDIA#142)
Browse files Browse the repository at this point in the history
Wasn't found due to testing using CMake 3.27+
  • Loading branch information
robertmaynard committed Oct 18, 2023
1 parent 0eab168 commit 07bc58b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nvbench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ endif()
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.27)
target_link_libraries(nvbench PRIVATE $<COMPILE_ONLY:nvbench_git_revision>)
else()
add_dependencies(nvbench nvbench_git_revision)
# Need to add dependencies on the internal implementation targets from rapids-cmake
# so that we generate the git header before using it
add_dependencies(nvbench nvbench_git_revision nvbench_git_revision_compute_git_info)
get_target_property(_include_dir nvbench_git_revision INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(nvbench PRIVATE "$<BUILD_INTERFACE:${_include_dir}>")
endif()

0 comments on commit 07bc58b

Please sign in to comment.