summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorYauheni Khnykin <hsilgos@gmail.com>2020-01-25 22:41:42 (GMT)
committerBrad King <brad.king@kitware.com>2020-01-27 21:14:19 (GMT)
commit64304fe72b2956937b3e0916284aec1efa4dca78 (patch)
tree5ca70c550ad4dd1f021f8b0e24c2249679425948 /Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
parent33e7bd66c09ee51edbbccfc1014813e30d80ec5f (diff)
downloadCMake-64304fe72b2956937b3e0916284aec1efa4dca78.zip
CMake-64304fe72b2956937b3e0916284aec1efa4dca78.tar.gz
CMake-64304fe72b2956937b3e0916284aec1efa4dca78.tar.bz2
Xcode: Fix post build script for 'top level project only' opt
When CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY is set on Xcode generator created post build scripts which tried to call XCODE_DEPEND_HELPER.make script in subproject. But XCODE_DEPEND_HELPER.make don't exist in subprojects when mentioned option is set on. Fixes: #20262
Diffstat (limited to 'Tests/RunCMake/XcodeProject/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 6ecf3f2..f1dda54 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -8,6 +8,16 @@ run_cmake(XcodeAttributeLocation)
run_cmake(XcodeAttributeGenex)
run_cmake(XcodeAttributeGenexError)
run_cmake(XcodeGenerateTopLevelProjectOnly)
+
+function(XcodeGenerateTopLevelProjectOnlyWithObjectLibrary)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeGenerateTopLevelProjectOnlyWithObjectLibrary-build)
+ run_cmake(XcodeGenerateTopLevelProjectOnlyWithObjectLibrary)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(XcodeGenerateTopLevelProjectOnlyWithObjectLibrary-build ${CMAKE_COMMAND} --build . --target shared_lib)
+endfunction()
+
+XcodeGenerateTopLevelProjectOnlyWithObjectLibrary()
+
run_cmake(XcodeObjectNeedsEscape)
run_cmake(XcodeObjectNeedsQuote)
run_cmake(XcodeOptimizationFlags)