Merge topic 'cuda_compute_build_path'
cd2d248
FindCUDA: CUDA_COMPUTE_BUILD_PATH uses relative paths to binary dir.
This commit is contained in:
commit
e778522161
|
@ -920,7 +920,13 @@ function(CUDA_COMPUTE_BUILD_PATH path build_path)
|
||||||
if (IS_ABSOLUTE "${bpath}")
|
if (IS_ABSOLUTE "${bpath}")
|
||||||
# Absolute paths are generally unnessary, especially if something like
|
# Absolute paths are generally unnessary, especially if something like
|
||||||
# file(GLOB_RECURSE) is used to pick up the files.
|
# file(GLOB_RECURSE) is used to pick up the files.
|
||||||
file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}")
|
|
||||||
|
string(FIND "${bpath}" "${CMAKE_CURRENT_BINARY_DIR}" _binary_dir_pos)
|
||||||
|
if (_binary_dir_pos EQUAL 0)
|
||||||
|
file(RELATIVE_PATH bpath "${CMAKE_CURRENT_BINARY_DIR}" "${bpath}")
|
||||||
|
else()
|
||||||
|
file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# This recipie is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the
|
# This recipie is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the
|
||||||
|
|
Loading…
Reference in New Issue