Commit a0af013c authored by Robert Maynard's avatar Robert Maynard
Browse files

Auto-detection of cuda version requires usage of a working directory.

Without a working directory specified, the executable will be output
to what-ever working directory cmake-gui was launched from. In most cases when
CMake is the 'system' version, this is a directory that you don't have write
access to.
parent f66d72c7
......@@ -91,9 +91,13 @@ if (VTKm_Base_FOUND)
#detect what the propery is set too
if(VTKm_CUDA_Architecture STREQUAL "native")
#run execute_process to do auto_detection
execute_process(COMMAND "${CUDA_NVCC_EXECUTABLE}" "-ccbin" "${CMAKE_CXX_COMPILER}" "--run" "${CMAKE_CURRENT_LIST_DIR}/VTKmDetectCUDAVersion.cxx"
set(command ${CUDA_NVCC_EXECUTABLE})
set(args "-ccbin" "${CMAKE_CXX_COMPILER}" "--run" "${CMAKE_CURRENT_LIST_DIR}/VTKmDetectCUDAVersion.cxx")
execute_process(COMMAND ${command} ${args}
RESULT_VARIABLE ran_properly
if(ran_properly EQUAL 0)
#find the position of the "--generate-code" output. With some compilers such as
Supports Markdown
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