Files
CMake/Tests/RunCMake/XcodeProject/XcodeWorkspace.cmake
Stepanov Igor 26869fb4ba cmake --build: Fix building multiple targets in Xcode workspace
Extend commit 844d79916a (cmake --build: Add support for driving Xcode
workspaces, 2025-06-02) to support multiple `--target` arguments.
`xcodebuild -scheme` cannot be repeated in a single call, so call it
multiple times instead.

Issue: #26958

Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2025-06-14 16:53:25 +10:00

11 lines
335 B
CMake

enable_language(C)
add_executable(main main.c)
add_custom_target(custom1)
add_custom_target(custom2)
file(WRITE "${CMAKE_BINARY_DIR}/XcodeWorkspace.xcworkspace/contents.xcworkspacedata" [[
<?xml version="1.0" encoding="UTF-8"?>
<Workspace version = "1.0">
<FileRef location = "container:XcodeWorkspace.xcodeproj"/>
</Workspace>
]])