diff options
author | Brad King <brad.king@kitware.com> | 2018-01-08 16:14:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-01-08 16:14:16 (GMT) |
commit | f7f34a46e674fcf0326b0dbbc6dbb35c9e3c022f (patch) | |
tree | 2a556a0358e403e4961b8f4a23bf2767899a437d /Modules/FindCUDA.cmake | |
parent | f4a314394039708e772374e54a31959f2de14825 (diff) | |
parent | 3c413e2a31b4fcb6a99dba04669c6a6517b97832 (diff) | |
download | CMake-f7f34a46e674fcf0326b0dbbc6dbb35c9e3c022f.zip CMake-f7f34a46e674fcf0326b0dbbc6dbb35c9e3c022f.tar.gz CMake-f7f34a46e674fcf0326b0dbbc6dbb35c9e3c022f.tar.bz2 |
Merge topic 'use_generator_is_multi_config'
3c413e2a GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Modules
c267ea1c GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1627
Diffstat (limited to 'Modules/FindCUDA.cmake')
-rw-r--r-- | Modules/FindCUDA.cmake | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 7d000c0..4f4453b 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -578,12 +578,15 @@ mark_as_advanced( CUDA_SEPARABLE_COMPILATION ) -# Makefile and similar generators don't define CMAKE_CONFIGURATION_TYPES, so we -# need to add another entry for the CMAKE_BUILD_TYPE. We also need to add the -# standerd set of 4 build types (Debug, MinSizeRel, Release, and RelWithDebInfo) -# for completeness. We need run this loop in order to accommodate the addition -# of extra configuration types. Duplicate entries will be removed by -# REMOVE_DUPLICATES. +# Single config generators like Makefiles or Ninja don't usually have +# CMAKE_CONFIGURATION_TYPES defined (but note that it can be defined if set by +# projects or developers). Even CMAKE_BUILD_TYPE might not be defined for +# single config generators (and should not be defined for multi-config +# generators). To ensure we get a complete superset of all possible +# configurations, we combine CMAKE_CONFIGURATION_TYPES, CMAKE_BUILD_TYPE and +# all of the standard configurations, then weed out duplicates with +# list(REMOVE_DUPLICATES). Looping over the unique set then ensures we have +# each configuration-specific set of nvcc flags defined and marked as advanced. set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo) list(REMOVE_DUPLICATES CUDA_configuration_types) foreach(config ${CUDA_configuration_types}) |