summaryrefslogtreecommitdiffstats
path: root/Tests/ConfigSources
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-02-13 16:25:00 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-02 21:14:02 (GMT)
commite6971df6ab647031ba9689c9afbbde78cc62e35f (patch)
treec9c67c6e3a1627d65cda8ee93373b97403c92106 /Tests/ConfigSources
parentdf753df94bb1e995372baabb0240585560c72ded (diff)
downloadCMake-e6971df6ab647031ba9689c9afbbde78cc62e35f.zip
CMake-e6971df6ab647031ba9689c9afbbde78cc62e35f.tar.gz
CMake-e6971df6ab647031ba9689c9afbbde78cc62e35f.tar.bz2
cmTarget: Make the source files depend on the config.
Disallow the use of config-specific source files with the Visual Studio and Xcode generators. They don't have any way to represent the condition currently. Use the same common-config API in cmQtAutoGenerators. While it accepts config-specific files, it doesn't have to support multiple configurations yet. Loop over the configs in cmTargetTraceDependencies and cmGlobalGenerator::WriteSummary and consume all source files. Loop over the configs in cmComputeTargetDepends and compute the object library dependencies for each config.
Diffstat (limited to 'Tests/ConfigSources')
-rw-r--r--Tests/ConfigSources/CMakeLists.txt9
-rw-r--r--Tests/ConfigSources/main.cpp5
2 files changed, 14 insertions, 0 deletions
diff --git a/Tests/ConfigSources/CMakeLists.txt b/Tests/ConfigSources/CMakeLists.txt
new file mode 100644
index 0000000..68a4233
--- /dev/null
+++ b/Tests/ConfigSources/CMakeLists.txt
@@ -0,0 +1,9 @@
+
+cmake_minimum_required(VERSION 3.0)
+
+project(ConfigSources)
+
+add_executable(ConfigSources
+ $<$<CONFIG:Debug>:main.cpp>
+ $<$<CONFIG:Release>:does_not_exist.cpp>
+)
diff --git a/Tests/ConfigSources/main.cpp b/Tests/ConfigSources/main.cpp
new file mode 100644
index 0000000..1c19e8d
--- /dev/null
+++ b/Tests/ConfigSources/main.cpp
@@ -0,0 +1,5 @@
+
+int main(int argc, char** argv)
+{
+ return 0;
+}