summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-02 17:59:15 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-17 18:05:39 (GMT)
commit55a0bebdd3d253f81bd89782702d481ac81110b3 (patch)
tree51a92b849ede48404455a03c562d0d0a9a95714a /Tests/CMakeLists.txt
parentbcaecf6bcddfaec2b586bff870650a4a66b0ccc3 (diff)
downloadCMake-55a0bebdd3d253f81bd89782702d481ac81110b3.zip
CMake-55a0bebdd3d253f81bd89782702d481ac81110b3.tar.gz
CMake-55a0bebdd3d253f81bd89782702d481ac81110b3.tar.bz2
VS: Add support for per-config sources
Since commit 97cc29c766 (VS: Teach generators how to mark per-config source files, 2017-04-10, v3.9.0-rc1~268^2~2) the VS generators have known how to generate per-config sources. We've now converted most other code paths to support per-config sources, so drop the check that disallows it. This leaves only per-config support for precompiled headers and unity build transformations, but those are optional features that can be addressed later. Fixes: #18233 Issue: #19789
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index b29638b..185401f 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -451,8 +451,12 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(StagingPrefix StagingPrefix)
ADD_TEST_MACRO(ImportedSameName ImportedSameName)
ADD_TEST_MACRO(InterfaceLibrary InterfaceLibrary)
- if(NOT _isMultiConfig)
- set(ConfigSources_BUILD_OPTIONS -DCMAKE_BUILD_TYPE=$<CONFIGURATION>)
+ if(NOT CMAKE_GENERATOR STREQUAL "Xcode")
+ if(_isMultiConfig)
+ set(ConfigSources_CTEST_OPTIONS --build-config $<CONFIGURATION>)
+ else()
+ set(ConfigSources_BUILD_OPTIONS -DCMAKE_BUILD_TYPE=$<CONFIGURATION>)
+ endif()
ADD_TEST_MACRO(ConfigSources ConfigSources)
endif()
ADD_TEST_MACRO(SourcesProperty SourcesProperty)