summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VSSolution/StartupProjectUseFolders-check.cmake
diff options
context:
space:
mode:
authorTaylor Braun-Jones <taylor@braun-jones.org>2016-03-21 20:01:20 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-23 17:22:15 (GMT)
commitf069be054833f465ab469b534fddbc52c5c9913b (patch)
treecef4fffdbd67374055d67a7ce9c2f918c68f9fec /Tests/RunCMake/VSSolution/StartupProjectUseFolders-check.cmake
parentc05ea48545f04dee8666094b0731366b64dfc9ad (diff)
downloadCMake-f069be054833f465ab469b534fddbc52c5c9913b.zip
CMake-f069be054833f465ab469b534fddbc52c5c9913b.tar.gz
CMake-f069be054833f465ab469b534fddbc52c5c9913b.tar.bz2
VS: Fix default target support for targets nested inside a folder
It's not actually the first target in a `.sln` file that is treated as the default startup project, but rather the first fully defined target.
Diffstat (limited to 'Tests/RunCMake/VSSolution/StartupProjectUseFolders-check.cmake')
-rw-r--r--Tests/RunCMake/VSSolution/StartupProjectUseFolders-check.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/VSSolution/StartupProjectUseFolders-check.cmake b/Tests/RunCMake/VSSolution/StartupProjectUseFolders-check.cmake
new file mode 100644
index 0000000..c0a545a
--- /dev/null
+++ b/Tests/RunCMake/VSSolution/StartupProjectUseFolders-check.cmake
@@ -0,0 +1,9 @@
+getProjectNames(projects)
+list(GET projects 0 first_project)
+if(NOT first_project STREQUAL "CMakePredefinedTargets")
+ error("CMakePredefinedTargets is not the first project")
+endif()
+list(GET projects 1 second_project)
+if(NOT second_project STREQUAL "TestStartup")
+ error("TestStartup does not immediately follow the CMakePredefinedTargets project")
+endif()