Skip to content
Snippets Groups Projects
Commit 195befaa authored by Sam Yates's avatar Sam Yates Committed by Ben Cumming
Browse files

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.
parent c8428889
No related branches found
No related tags found
No related merge requests found
...@@ -20,15 +20,13 @@ build_modules( ...@@ -20,15 +20,13 @@ build_modules(
TARGET build_all_mods TARGET build_all_mods
) )
if(NMC_WITH_CUDA) set(mech_dir "${CMAKE_CURRENT_SOURCE_DIR}/gpu")
set(mech_dir "${CMAKE_CURRENT_SOURCE_DIR}/gpu") file(MAKE_DIRECTORY "${mech_dir}")
file(MAKE_DIRECTORY "${mech_dir}") build_modules(
build_modules( ${mechanisms}
${mechanisms} SOURCE_DIR "${mod_srcdir}"
SOURCE_DIR "${mod_srcdir}" DEST_DIR "${mech_dir}"
DEST_DIR "${mech_dir}" MODCC_FLAGS -t gpu ${modcc_opt}
MODCC_FLAGS -t gpu ${modcc_opt} TARGET build_all_gpu_mods
TARGET build_all_gpu_mods )
)
endif()
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