summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject
diff options
context:
space:
mode:
authorHarry Mallon <hjmallon@gmail.com>2019-03-11 12:57:39 (GMT)
committerHarry Mallon <hjmallon@gmail.com>2019-03-21 16:50:41 (GMT)
commit413b71485a456456e204183f0d62e11e1ec3c1da (patch)
tree54a69634dd466a5b02846c29d018fc3c2ecbf892 /Tests/RunCMake/XcodeProject
parentd2101e944a03056dc2180dd790ba85175e04d653 (diff)
downloadCMake-413b71485a456456e204183f0d62e11e1ec3c1da.zip
CMake-413b71485a456456e204183f0d62e11e1ec3c1da.tar.gz
CMake-413b71485a456456e204183f0d62e11e1ec3c1da.tar.bz2
Xcode: Create Xcode schemes per target
Diffstat (limited to 'Tests/RunCMake/XcodeProject')
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake9
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake3
2 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake
index f675d81..88077b3 100644
--- a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty-check.cmake
@@ -7,6 +7,13 @@ function(check_property property matcher)
endif()
endfunction()
+function(expect_no_schema target)
+ set(schema "${RunCMake_TEST_BINARY_DIR}/XcodeSchemaProperty.xcodeproj/xcshareddata/xcschemes/${target}.xcscheme")
+ if(EXISTS ${schema})
+ message(SEND_ERROR "Found unexpected schema ${schema}")
+ endif()
+endfunction()
+
check_property("ADDRESS_SANITIZER" "enableAddressSanitizer")
check_property("ADDRESS_SANITIZER_USE_AFTER_RETURN" "enableASanStackUseAfterReturn")
check_property("THREAD_SANITIZER" "enableThreadSanitizer")
@@ -31,3 +38,5 @@ check_property("ENVIRONMENT" [=[key="FOO"]=])
check_property("ENVIRONMENT" [=[value="foo"]=])
check_property("ENVIRONMENT" [=[key="BAR"]=])
check_property("ENVIRONMENT" [=[value="bar"]=])
+
+expect_no_schema("NoSchema")
diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake
index 2b72a64..73ef5ca 100644
--- a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake
@@ -35,3 +35,6 @@ endfunction()
create_scheme_for_property(EXECUTABLE myExecutable)
create_scheme_for_property(ARGUMENTS "--foo;--bar=baz")
create_scheme_for_property(ENVIRONMENT "FOO=foo;BAR=bar")
+
+add_executable(NoSchema main.cpp)
+set_target_properties(NoSchema PROPERTIES XCODE_GENERATE_SCHEME OFF)