summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2017-10-19 20:48:13 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2017-10-31 16:09:26 (GMT)
commite4e9ce7cbe9b41dd535d5246153900cb9657c6ba (patch)
tree2468f4181c0ffd92b5811e33cdc13e42c956e2e3 /Tests/RunCMake/XcodeProject
parent41d796be155e0da8fec66cb281429ed0eb91650d (diff)
downloadCMake-e4e9ce7cbe9b41dd535d5246153900cb9657c6ba.zip
CMake-e4e9ce7cbe9b41dd535d5246153900cb9657c6ba.tar.gz
CMake-e4e9ce7cbe9b41dd535d5246153900cb9657c6ba.tar.bz2
Xcode: Add option to generate only topmost project file
Closes #16780
Diffstat (limited to 'Tests/RunCMake/XcodeProject')
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly-check.cmake3
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly.cmake3
-rw-r--r--Tests/RunCMake/XcodeProject/subproject/CMakeLists.txt1
4 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 7d436b6..f730b83 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -8,6 +8,7 @@ run_cmake(XcodeFileType)
run_cmake(XcodeAttributeLocation)
run_cmake(XcodeAttributeGenex)
run_cmake(XcodeAttributeGenexError)
+run_cmake(XcodeGenerateTopLevelProjectOnly)
run_cmake(XcodeObjectNeedsEscape)
run_cmake(XcodeObjectNeedsQuote)
run_cmake(XcodeOptimizationFlags)
diff --git a/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly-check.cmake b/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly-check.cmake
new file mode 100644
index 0000000..64654af
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly-check.cmake
@@ -0,0 +1,3 @@
+if(EXISTS "${RunCMake_TEST_BINARY_DIR}/subproject/subproject.xcodeproj")
+ message(SEND_ERROR "Unexpected project file for subproject found.")
+endif()
diff --git a/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly.cmake b/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly.cmake
new file mode 100644
index 0000000..7e53c49
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeGenerateTopLevelProjectOnly.cmake
@@ -0,0 +1,3 @@
+set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY TRUE)
+project(XcodeGenerateTopLevelProjectOnly NONE)
+add_subdirectory(subproject)
diff --git a/Tests/RunCMake/XcodeProject/subproject/CMakeLists.txt b/Tests/RunCMake/XcodeProject/subproject/CMakeLists.txt
new file mode 100644
index 0000000..20e12b1
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/subproject/CMakeLists.txt
@@ -0,0 +1 @@
+project(subproject)