summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-06-27 13:20:42 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-06-27 13:20:51 (GMT)
commit33d6145f873029577e3498b843b6ef5646c594b8 (patch)
tree0e442021089352a75e98fd31ebb159b5148f5ac8
parent43c3afa74538fd7b78bcf534bfb3fa93c3c1f191 (diff)
parent46d25e782ebd9b6c50771b6f30433c58fae03a51 (diff)
downloadCMake-33d6145f873029577e3498b843b6ef5646c594b8.zip
CMake-33d6145f873029577e3498b843b6ef5646c594b8.tar.gz
CMake-33d6145f873029577e3498b843b6ef5646c594b8.tar.bz2
Merge topic 'FindCUDA-no-find_host_program'
46d25e78 FindCUDA: Use find_program if find_host_program is not available Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1009
-rw-r--r--Modules/FindCUDA.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index a4dca54..77ca351 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -679,7 +679,11 @@ if(CMAKE_CROSSCOMPILING)
# add known CUDA targetr root path to the set of directories we search for programs, libraries and headers
set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}")
macro( cuda_find_host_program )
- find_host_program( ${ARGN} )
+ if (COMMAND find_host_program)
+ find_host_program( ${ARGN} )
+ else()
+ find_program( ${ARGN} )
+ endif()
endmacro()
else()
# for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR