summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject
diff options
context:
space:
mode:
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)