Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #534 from robertmaynard/handle_cmake_root_path
Browse files Browse the repository at this point in the history
Remove usage of find_path to locate cub/version.cuh
  • Loading branch information
alliepiper authored Jul 27, 2022
2 parents 5ea9784 + ea6a8c2 commit 0430cc0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions cub/cmake/cub-header-search.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
unset(_CUB_VERSION_INCLUDE_DIR CACHE) # Clear old result to force search
find_path(_CUB_VERSION_INCLUDE_DIR cub/version.cuh
NO_DEFAULT_PATH # Only search explicit paths below:
PATHS
"${CMAKE_CURRENT_LIST_DIR}/../.." # Source tree
)
set_property(CACHE _CUB_VERSION_INCLUDE_DIR PROPERTY TYPE INTERNAL)
# Parse version information from version.h in source tree
set(_CUB_VERSION_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../..")
if(EXISTS "${_CUB_VERSION_INCLUDE_DIR}/cub/version.cuh")
set(_CUB_VERSION_INCLUDE_DIR "${_CUB_VERSION_INCLUDE_DIR}" CACHE FILEPATH "" FORCE) # Clear old result
set_property(CACHE _CUB_VERSION_INCLUDE_DIR PROPERTY TYPE INTERNAL)
endif()

0 comments on commit 0430cc0

Please sign in to comment.