From 195befaad90232782d9211f0e88f2fa6c3fcca60 Mon Sep 17 00:00:00 2001 From: Sam Yates <yates@cscs.ch> Date: Wed, 15 Mar 2017 11:21:04 +0100 Subject: [PATCH] Allow explicit make of GPU mechanisms. (#192) When NMC_WITH_CUDA is off, still allow the generation of CUDA mechanisms with modcc by exposing the `build_all_gpu_mods` target; this can be performed independently of the presence (or otherwise) of a CUDA development environment. This eases development of GPU-related modcc tasks, as preliminary work can be performed and checked on machines without a CUDA environment. --- mechanisms/CMakeLists.txt | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/mechanisms/CMakeLists.txt b/mechanisms/CMakeLists.txt index 3f543b64..0fef1d41 100644 --- a/mechanisms/CMakeLists.txt +++ b/mechanisms/CMakeLists.txt @@ -20,15 +20,13 @@ build_modules( TARGET build_all_mods ) -if(NMC_WITH_CUDA) - set(mech_dir "${CMAKE_CURRENT_SOURCE_DIR}/gpu") - file(MAKE_DIRECTORY "${mech_dir}") - build_modules( - ${mechanisms} - SOURCE_DIR "${mod_srcdir}" - DEST_DIR "${mech_dir}" - MODCC_FLAGS -t gpu ${modcc_opt} - TARGET build_all_gpu_mods - ) -endif() +set(mech_dir "${CMAKE_CURRENT_SOURCE_DIR}/gpu") +file(MAKE_DIRECTORY "${mech_dir}") +build_modules( + ${mechanisms} + SOURCE_DIR "${mod_srcdir}" + DEST_DIR "${mech_dir}" + MODCC_FLAGS -t gpu ${modcc_opt} + TARGET build_all_gpu_mods +) -- GitLab