From 3ef3945ab9f268f5b011552a9cc5d2feba7517c2 Mon Sep 17 00:00:00 2001 From: Szilard Pall Date: Thu, 15 Nov 2012 23:26:47 +0100 Subject: [PATCH] always mark as advanced leftover FindCUDA variables If the user turned off GMX_GPU after a failed configure pass, some variables were still left behind. Now these variables are marked as advanced unconditionally. Change-Id: Ia20ad5a164b6a8b43801ad1d83bc03332da5f6c1 --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7dd6f4540a..b8aa8e05cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -581,10 +581,11 @@ if(GMX_GPU) if(CMAKE_COMPILER_IS_GNUCC) set(GROMACS_LINKER_FLAGS "-Wl,--add-needed ${GROMACS_LINKER_FLAGS}") endif() - - # annoyingly enough, FindCUDA leaves a few variables behind as non-advanced - mark_as_advanced(CUDA_BUILD_CUBIN CUDA_BUILD_EMULATION CUDA_SDK_ROOT_DIR CUDA_VERBOSE_BUILD) endif() +# Annoyingly enough, FindCUDA leaves a few variables behind as non-advanced. +# We need to mark these advanced outside the conditional, otherwise, if the user +# tuns GMX_GPU=OFF after a failed cmake pass, these variables will be left behind. +mark_as_advanced(CUDA_BUILD_CUBIN CUDA_BUILD_EMULATION CUDA_SDK_ROOT_DIR CUDA_VERBOSE_BUILD) if(APPLE) find_library(ACCELERATE_FRAMEWORK Accelerate) -- 2.22.0