From 969fb1d08b7fd33c809ce967b9e3bc38d5ac83cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Szil=C3=A1rd=20P=C3=A1ll?= Date: Fri, 8 Dec 2017 20:04:06 +0100 Subject: [PATCH] Disable default-on NVML support in CMake Due to the problems related to NVML builds failing in link stage when linking against stub libs, we disable NVML by default to protect users from a hard to disagnose bug. Refs #2311 Change-Id: Id083254bc4344fbb3a91e7dd645a5f814163d043 --- cmake/gmxManageGPU.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/gmxManageGPU.cmake b/cmake/gmxManageGPU.cmake index 435ed0c17e..5fc123686f 100644 --- a/cmake/gmxManageGPU.cmake +++ b/cmake/gmxManageGPU.cmake @@ -143,10 +143,12 @@ if (GMX_GPU) if (DEFINED NVML_LIBRARY) set(NVML_FIND_QUIETLY TRUE) endif() - find_package(NVML) - option(GMX_USE_NVML "Use NVML support for better CUDA performance" ${NVML_FOUND}) - mark_as_advanced(GMX_USE_NVML) + if(GMX_USE_NVML) + find_package(NVML) + option(GMX_USE_NVML "Use NVML support for better CUDA performance" ${NVML_FOUND}) + mark_as_advanced(GMX_USE_NVML) + if(NVML_FOUND) include_directories(SYSTEM ${NVML_INCLUDE_DIR}) set(HAVE_NVML 1) -- 2.11.4.GIT