Skip to content
Snippets Groups Projects
Commit 3fd9f4ab authored by Gregor Jasny's avatar Gregor Jasny
Browse files

Xcode: Add test for schema generation

Closes: #15441
parent cf13e495
No related branches found
No related tags found
No related merge requests found
......@@ -187,3 +187,19 @@ if(NOT XCODE_VERSION VERSION_LESS 5)
unset(RunCMake_TEST_NO_CLEAN)
unset(RunCMake_TEST_OPTIONS)
endif()
function(XcodeSchemaGeneration)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeSchemaGeneration-build)
set(RunCMake_TEST_NO_CLEAN 1)
set(RunCMake_TEST_OPTIONS "-DCMAKE_XCODE_GENERATE_SCHEME=ON")
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
run_cmake(XcodeSchemaGeneration)
run_cmake_command(XcodeSchemaGeneration-build xcodebuild -scheme foo build)
endfunction()
if(NOT XCODE_VERSION VERSION_LESS 7)
XcodeSchemaGeneration()
endif()
cmake_minimum_required(VERSION 3.7)
project(XcodeSchemaGeneration CXX)
add_executable(foo main.cpp)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment