If detection has been done and GPUs were not detected, a user who
didn't give orders about using GPUs should not need to worry about
anything with CUDA in the name. Otherwise, messages like
"CUDA_TOOLKIT_ROOT_DIR not found or specified" are emitted
by FindCUDA as warnings, and require user interaction when
using ccmake.
Change-Id: If31603a4bdfd72ca5ed4f0313f708b3efe778a74
# We need to call find_package even when we've already done the detection/setup
if(GMX_GPU OR GMX_GPU_AUTO)
+ if(NOT GMX_GPU AND GMX_GPU_AUTO AND GMX_GPU_DETECTION_DONE)
+ # Stay quiet when detection has occured and found no GPU.
+ # Noise is acceptable when there is a GPU or the user required one.
+ set(FIND_CUDA_QUIETLY QUIET)
+ endif()
# We support CUDA >=v3.2 on *nix, but <= v4.1 doesn't work with MSVC
if(MSVC)
- find_package(CUDA 4.1)
+ find_package(CUDA 4.1 ${FIND_CUDA_QUIETLY})
else()
- find_package(CUDA 3.2)
+ find_package(CUDA 3.2 ${FIND_CUDA_QUIETLY})
endif()
endif()