Commit 06a20544 authored by Christopher Bruns's avatar Christopher Bruns
Browse files

Changed link line for gpu sniffing program so it works on Windows with new...

Changed link line for gpu sniffing program so it works on Windows with new single FindCuda location.
parent abc4a81e
......@@ -36,9 +36,6 @@ IF(NOT cmv EQUAL "2.4") # This whole file...
# We have custom cmake modules for FindOpenMM and running python tests
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules")
# Does someone at Kitware actually believe that this policy crap
# might actually make cmake LESS brittle?
# (Probably the same genius who came up the endif(allthesamecrap) syntax)
# Older cmake versions do not have cmake_policy command
# Cmake 2.4.5, the default cmake on red hat linux, has the
# cmake_policy command, but it does not work
......
......@@ -17,6 +17,7 @@
# Only run tests if this machine has a cuda-capable GPU
# So run a little test program at configuration time to sniff for GPUs
# find_package(CUDA) # find_package has already run and causes trouble w/ cmake 2.4
message("Checking for working GPU...")
try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/tests/has_cuda_gpu.c
......@@ -24,7 +25,7 @@ try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR
# -DINCLUDE_DIRECTORIES:STRING=${CUDA_TOOLKIT_INCLUDE}
# -DLINK_LIBRARIES:STRING=${CUDA_CUDART_LIBRARY}
-DINCLUDE_DIRECTORIES:STRING=${CUDA_INCLUDE}
-DLINK_LIBRARIES:STRING=${CUDA_TARGET_LINK}
-DLINK_LIBRARIES:STRING=${FOUND_CUDART}
COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT_VAR
RUN_OUTPUT_VARIABLE RUN_OUTPUT_VAR
)
......@@ -40,8 +41,12 @@ if(RUN_RESULT_VAR)
endif(RUN_RESULT_VAR)
if(CUDA_HAVE_GPU_MAYBE)
set(CUDA_HAVE_GPU TRUE CACHE BOOL "Whether CUDA-capable GPU is present")
message("GPU check succeeded")
else(CUDA_HAVE_GPU_MAYBE)
set(CUDA_HAVE_GPU FALSE CACHE BOOL "Whether CUDA-capable GPU is present")
message("GPU check failed")
message("${COMPILE_OUTPUT_VAR}")
message("${RUN_OUTPUT_VAR}")
endif(CUDA_HAVE_GPU_MAYBE)
if(CUDA_HAVE_GPU)
SUBDIRS (tests)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment