CMake issueshttps://gitlab.kitware.com/cmake/cmake/-/issues2024-02-09T09:17:21-05:00https://gitlab.kitware.com/cmake/cmake/-/issues/25573ci: Incomplete testing for CMake's Swift support on Windows2024-02-09T09:17:21-05:00Brad Kingci: Incomplete testing for CMake's Swift support on WindowsCMake's CI pipelines ~~do not cover~~ do not fully cover Swift on Windows.CMake's CI pipelines ~~do not cover~~ do not fully cover Swift on Windows.https://gitlab.kitware.com/cmake/cmake/-/issues/25572Swift/Ninja: Use a response file for swift sources2024-01-12T08:53:17-05:00Saleem AbdulrasoolSwift/Ninja: Use a response file for swift sourcesWe currently use a response file for Swift which only includes the flags to match the behaviour with other languages. However, Swift does module at a time compilation, passing all the sources to the invocation. This can quickly exceed th...We currently use a response file for Swift which only includes the flags to match the behaviour with other languages. However, Swift does module at a time compilation, passing all the sources to the invocation. This can quickly exceed the command line limit on Windows which will break the invocation. We should isolate the file list and pass it via a secondary response file.https://gitlab.kitware.com/cmake/cmake/-/issues/25295Swift: cxx_std_NN on linked libraries should propagate to swift compile options2023-10-06T17:46:05-04:00Andrew KasterSwift: cxx_std_NN on linked libraries should propagate to swift compile options<!--
This issue tracker is for CMake upstream development:
* If you are having trouble building a specific third-party project
that uses CMake, ask for help in that project's forums first.
* If you have a coding or usage question, pl...<!--
This issue tracker is for CMake upstream development:
* If you are having trouble building a specific third-party project
that uses CMake, ask for help in that project's forums first.
* If you have a coding or usage question, please ask for help
on the CMake discourse forums: https://discourse.cmake.org/
-->
Given a simple project like so, the `cxx_std_20` compile feature on `CxxDep` should translate to `-Xcc -std=c++20` for the swift targets that link `CxxDep`:
CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.25)
project(P LANGUAGES Swift CXX)
add_library(CxxDep INTERFACE)
target_include_directories(CxxDep INTERFACE Sources/CxxDep/include)
target_compile_features(CxxDep INTERFACE cxx_std_20)
add_executable(SwiftExe Sources/SwiftExe/main.swift)
target_compile_options(SwiftExe PRIVATE -cxx-interoperability-mode=default)
target_link_libraries(SwiftExe PRIVATE CxxDep)
```
Sources/CxxDep/include/module.modulemap
```
module CxxDep [system] {
requires cplusplus
module A {
header "A.h"
export *
}
}
```
Sources/CxxDep/include/A.h
```cpp
#ifndef CXXDEP_A_H
#define CXXDEP_A_H
#if __cplusplus < 202002L
#error "need c++20"
#endif
#endif
```
Sources/SwiftExe/main.swift
```
import CxxDep
print("hi")
```
This should succeed in compiling like so:
```shell
cmake -B build -G Ninja
cmake --build build
```
However with CMake 3.27 and Swift 5.9, it does not. I need to use a manual way of setting the C++ version for any linked c++ modules:
`target_compile_options(CxxDep INTERFACE "SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc -std=c++20>")`
The swift package manager has a top level package setting for this: https://developer.apple.com/documentation/packagedescription/package/cxxlanguagestandard
In my opinion it would make sense for the cxx_std_NN properties to propagate to swift targets to get feature parity there.https://gitlab.kitware.com/cmake/cmake/-/issues/25269Swift: Add option to set default cxx-interoperability-mode2023-10-25T17:22:23-04:00Andrew KasterSwift: Add option to set default cxx-interoperability-mode<!--
This issue tracker is for CMake upstream development:
* If you are having trouble building a specific third-party project
that uses CMake, ask for help in that project's forums first.
* If you have a coding or usage question, pl...<!--
This issue tracker is for CMake upstream development:
* If you are having trouble building a specific third-party project
that uses CMake, ask for help in that project's forums first.
* If you have a coding or usage question, please ask for help
on the CMake discourse forums: https://discourse.cmake.org/
-->
With Swift 5.9/Xcode 15 they have added more C++ Interop features.
The `-enable-experimental-cxx-interop` flag has been replaced with `-cxx-interoperability-mode=default` or `-cxx-interoperability-mode=off`
> $ swiftc --help | grep interop
> -cxx-interoperability-mode=<value>
> Enables C++ interoperability; pass 'default' to enable or 'off' to disable
However, setting this flag on a swift target has no impact on a generated Xcode project. The project should have the `C++ and Objective C Interoperability` setting set to "C++/Objective C++" rather than the default "C/Objective C". Turns out the default mode is not "default" but "off" :thinking:.
![270131386-258334a0-3f4c-44cf-8587-cdf3a743438e](/uploads/0510f93b12de68e8705bfadd8e57b616/270131386-258334a0-3f4c-44cf-8587-cdf3a743438e.png)
Should there be a global setting to set this flag on the project builtin to CMake? Or is it my responsibility to set the Xcode property on my swift target manually?
Here's an example that uses the feature that I forked and updated for Xcode 15.
https://github.com/ADKaster/swift-cmake-examples/tree/xcode-15/Interop
Note that I used this example in an upstream bug report here https://github.com/apple/swift/issues/68726, pointing out that the C++20 char8_t struct member is dropped on the floor when used.https://gitlab.kitware.com/cmake/cmake/-/issues/24981Swift: Support multiple CMAKE_OSX_ARCHITECTURES values2024-03-05T16:13:47-05:00Davy DurhamSwift: Support multiple CMAKE_OSX_ARCHITECTURES valuesPlease support multiple architectures when building Swift code.
I received this error when CMAKE_OSX_ARCHITECTURES was set to "x86_64;arm64":
`multiple values for CMAKE_OSX_ARCHITECTURES not supported with Swift`
That was introduced in...Please support multiple architectures when building Swift code.
I received this error when CMAKE_OSX_ARCHITECTURES was set to "x86_64;arm64":
`multiple values for CMAKE_OSX_ARCHITECTURES not supported with Swift`
That was introduced in 2019 with this merge request, presumably because multiarch compiles wasn't supported at the time:
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4283 by @compnerd
However, this post https://liamnichols.eu/2020/08/01/building-swift-packages-as-a-universal-binary.html seems to indicate that it's been supported since 2020.
I tried (with my project) to get it to work with simply passing multiple --arch flags, but ran into some problems with symbols not found in the stdlib. But that may just be my environment. I'll update this issue if I discover any more helpful information.
Is it possible that this could be re-evaluated and add support for it?
Thanks!https://gitlab.kitware.com/cmake/cmake/-/issues/24650Swift: Build fails with MacCatalyst2023-04-06T01:06:54-04:00Paulo CoutinhoSwift: Build fails with MacCatalystHi,
I found a problem when i enable swift language with mac catalyst:
```
enable_language(Swift)
```
It works for iOS, tvOS, macOS and watchOS, but when i compile for mac catalyst it throw error:
<details>
```
[INFO] Building for ar...Hi,
I found a problem when i enable swift language with mac catalyst:
```
enable_language(Swift)
```
It works for iOS, tvOS, macOS and watchOS, but when i compile for mac catalyst it throw error:
<details>
```
[INFO] Building for arch arm64...
-- Using Conan toolchain: /Users/paulo/Developer/workspaces/cpp/xplpc/build/conan/swift-ios/mac-catalyst/arm64/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Component target declared 'fmt::fmt'
-- Conan: Component target declared 'spdlog::spdlog'
-- Conan: Target declared 'nlohmann_json::nlohmann_json'
-- XPLPC Target: swift
-- XPLPC Interface: Enabled
-- XPLPC Custom Data: cxx/custom
-- The Swift compiler identification is Apple 5.7.2
-- Check for working Swift compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend
-- Check for working Swift compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend - broken
CMake Error at /opt/homebrew/Cellar/cmake/3.26.1/share/cmake/Modules/CMakeTestSwiftCompiler.cmake:40 (message):
The Swift compiler
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
Run Build Command(s):/usr/bin/xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_88260 -parallelizeTargets -configuration Debug -hideShellScriptEnvironment && Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_88260 -parallelizeTargets -configuration Debug -hideShellScriptEnvironment
User defaults from command line:
HideShellScriptEnvironment = YES
IDEPackageSupportUseBuiltinSCM = YES
Computing target dependency graph and provisioning inputs
Create build description
Build description signature: f4cceda92bf363c1f15b88bd57c2392b
Build description path: /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/XCBuildData/f4cceda92bf363c1f15b88bd57c2392b-desc.xcbuild
note: Building targets in dependency order
CreateBuildDirectory /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/CMAKE_TRY_COMPILE.xcodeproj
builtin-create-build-directory /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build
CreateBuildDirectory /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/CMAKE_TRY_COMPILE.xcodeproj
builtin-create-build-directory /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug
CreateBuildDirectory /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/EagerLinkingTBDs
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/CMAKE_TRY_COMPILE.xcodeproj
builtin-create-build-directory /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/EagerLinkingTBDs
WriteAuxiliaryFile /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.LinkFileList (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
write-file /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.LinkFileList
WriteAuxiliaryFile /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.SwiftFileList (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
write-file /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.SwiftFileList
WriteAuxiliaryFile /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-OutputFileMap.json (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
write-file /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-OutputFileMap.json
SwiftDriver cmTC_88260 normal arm64 com.apple.xcode.tools.swift.compiler (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
builtin-SwiftDriver -- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -module-name cmTC_88260 -O -enforce-exclusivity\=checked @/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.SwiftFileList -Onone -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -target arm64-apple-macos13.1 -enable-bare-slash-regex -g -Xfrontend -serialize-debugging-options -swift-version 4 -I /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -F /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -c -j10 -enable-batch-mode -incremental -output-file-map /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-OutputFileMap.json -use-frontend-parseable-output -save-temps -no-color-diagnostics -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftmodule -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/swift-overrides.hmap -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/include -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources-normal/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources -Xcc -DCMAKE_INTDIR\=\"Debug\" -emit-objc-header -emit-objc-header-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-Swift.h -working-directory /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ -experimental-emit-module-separately
SwiftEmitModule normal arm64 Emitting\ module\ for\ cmTC_88260 (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
builtin-swiftTaskExecution -- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -emit-module -experimental-skip-non-inlinable-function-bodies-without-types /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/main.swift -target arm64-apple-macos13.1 -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -I /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -F /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -no-color-diagnostics -g -swift-version 4 -enforce-exclusivity\=checked -Onone -serialize-debugging-options -enable-bare-slash-regex -empty-abi-descriptor -Xcc -working-directory -Xcc /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/swift-overrides.hmap -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/include -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources-normal/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources -Xcc -DCMAKE_INTDIR\=\"Debug\" -module-name cmTC_88260 -disable-clang-spi -target-sdk-version 13.1 -emit-module-doc-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftdoc -emit-module-source-info-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftsourceinfo -emit-objc-header-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-Swift.h -serialize-diagnostics-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-master-emit-module.dia -emit-dependencies-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-master-emit-module.d -o /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftmodule -emit-abi-descriptor-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.abi.json
SwiftCompile normal arm64 Compiling\ main.swift /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/main.swift (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
builtin-swiftTaskExecution -- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/main.swift -emit-dependencies-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/main.d -emit-reference-dependencies-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/main.swiftdeps -serialize-diagnostics-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/main.dia -target arm64-apple-macos13.1 -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -I /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -F /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -no-color-diagnostics -g -swift-version 4 -enforce-exclusivity\=checked -Onone -serialize-debugging-options -enable-bare-slash-regex -empty-abi-descriptor -Xcc -working-directory -Xcc /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/swift-overrides.hmap -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/include -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources-normal/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources -Xcc -DCMAKE_INTDIR\=\"Debug\" -module-name cmTC_88260 -frontend-parseable-output -disable-clang-spi -target-sdk-version 13.1 -o /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/main.o -index-unit-output-path /cmTC_88260.build/Debug/Objects-normal/arm64/main.o
CompileSwift normal arm64 /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/main.swift (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -c -primary-file /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/main.swift -emit-dependencies-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/main.d -emit-reference-dependencies-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/main.swiftdeps -serialize-diagnostics-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/main.dia -target arm64-apple-macos13.1 -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -I /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -F /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -no-color-diagnostics -g -swift-version 4 -enforce-exclusivity\=checked -Onone -serialize-debugging-options -enable-bare-slash-regex -empty-abi-descriptor -Xcc -working-directory -Xcc /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/swift-overrides.hmap -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/include -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources-normal/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources -Xcc -DCMAKE_INTDIR\=\"Debug\" -module-name cmTC_88260 -frontend-parseable-output -disable-clang-spi -target-sdk-version 13.1 -o /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/main.o -index-unit-output-path /cmTC_88260.build/Debug/Objects-normal/arm64/main.o
SwiftDriverJobDiscovery normal arm64 Emitting module for cmTC_88260 (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
SwiftDriver\ Compilation\ Requirements cmTC_88260 normal arm64 com.apple.xcode.tools.swift.compiler (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
builtin-Swift-Compilation-Requirements -- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -module-name cmTC_88260 -O -enforce-exclusivity\=checked @/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.SwiftFileList -Onone -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -target arm64-apple-macos13.1 -enable-bare-slash-regex -g -Xfrontend -serialize-debugging-options -swift-version 4 -I /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -F /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -c -j10 -enable-batch-mode -incremental -output-file-map /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-OutputFileMap.json -use-frontend-parseable-output -save-temps -no-color-diagnostics -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftmodule -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/swift-overrides.hmap -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/include -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources-normal/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources -Xcc -DCMAKE_INTDIR\=\"Debug\" -emit-objc-header -emit-objc-header-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-Swift.h -working-directory /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ -experimental-emit-module-separately
SwiftMergeGeneratedHeaders /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources/cmTC_88260-Swift.h /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-Swift.h (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
builtin-swiftHeaderTool -arch arm64 /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-Swift.h -o /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources/cmTC_88260-Swift.h
Copy /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/cmTC_88260.swiftmodule/arm64-apple-macos.swiftmodule /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftmodule (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks -rename /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftmodule /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/cmTC_88260.swiftmodule/arm64-apple-macos.swiftmodule
Copy /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/cmTC_88260.swiftmodule/arm64-apple-macos.swiftdoc /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftdoc (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks -rename /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftdoc /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/cmTC_88260.swiftmodule/arm64-apple-macos.swiftdoc
Copy /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/cmTC_88260.swiftmodule/arm64-apple-macos.abi.json /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.abi.json (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks -rename /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.abi.json /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/cmTC_88260.swiftmodule/arm64-apple-macos.abi.json
Copy /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/cmTC_88260.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftsourceinfo (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks -rename /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftsourceinfo /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/cmTC_88260.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo
SwiftDriverJobDiscovery normal arm64 Compiling main.swift (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
SwiftDriver\ Compilation cmTC_88260 normal arm64 com.apple.xcode.tools.swift.compiler (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
builtin-Swift-Compilation -- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -module-name cmTC_88260 -O -enforce-exclusivity\=checked @/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.SwiftFileList -Onone -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -target arm64-apple-macos13.1 -enable-bare-slash-regex -g -Xfrontend -serialize-debugging-options -swift-version 4 -I /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -F /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -c -j10 -enable-batch-mode -incremental -output-file-map /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-OutputFileMap.json -use-frontend-parseable-output -save-temps -no-color-diagnostics -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftmodule -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/swift-overrides.hmap -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/include -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources-normal/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources/arm64 -Xcc -I/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/DerivedSources -Xcc -DCMAKE_INTDIR\=\"Debug\" -emit-objc-header -emit-objc-header-path /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260-Swift.h -working-directory /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ -experimental-emit-module-separately
Ld /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/cmTC_88260 normal (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
cd /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-macos13.1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -L/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/EagerLinkingTBDs -L/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -F/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/EagerLinkingTBDs -F/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug -filelist /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.LinkFileList -Xlinker -object_path_lto -Xlinker /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260_lto.o -Xlinker -no_deduplicate -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260.swiftmodule --target\=arm64-apple-ios13.1-macabi -Xlinker -dependency_info -Xlinker /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/cmTC_88260_dependency_info.dat -o /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/cmTC_88260
ld: building for Mac Catalyst, but linking in object file built for macOS, file '/Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/build/cmTC_88260.build/Debug/Objects-normal/arm64/main.o'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64/CMakeFiles/CMakeScratch/TryCompile-y2wDPJ/Debug/cmTC_88260 normal (in target 'cmTC_88260' from project 'CMAKE_TRY_COMPILE')
(1 failure)
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:154 (enable_language)
-- Configuring incomplete, errors occurred!
COMMAND: cmake -S . -B /Users/paulo/Developer/workspaces/cpp/xplpc/build/swift-ios/mac-catalyst/arm64 -GXcode -DCMAKE_BUILD_TYPE=Release -DXPLPC_TARGET=swift -DXPLPC_ADD_CUSTOM_DATA=ON -DXPLPC_DEPENDENCY_TOOL=conan -DXPLPC_TARGET_GROUP=mac-catalyst -DXPLPC_ENABLE_INTERFACE=ON -DCMAKE_TOOLCHAIN_FILE=/Users/paulo/Developer/workspaces/cpp/xplpc/build/conan/swift-ios/mac-catalyst/arm64/conan_toolchain.cmake
WORKING DIR: None
[ERROR] Command execution has failed
```
</details>https://gitlab.kitware.com/cmake/cmake/-/issues/24571Ninja: Mixing Swift in ObjC: "fatal error: 'ObjcSwiftNinja-Swift.h' file not ...2023-04-20T09:26:32-04:00CœurNinja: Mixing Swift in ObjC: "fatal error: 'ObjcSwiftNinja-Swift.h' file not found"While it works fine with Xcode, I seem unable to use Ninja to build a mixed ObjC+Swift project. I get:
```
/Users/User/Developer/ObjcSwiftNinja/MyObjC.m:2:9: fatal error: 'ObjcSwiftNinja-Swift.h' file not found
#import "ObjcSwiftNinja-Sw...While it works fine with Xcode, I seem unable to use Ninja to build a mixed ObjC+Swift project. I get:
```
/Users/User/Developer/ObjcSwiftNinja/MyObjC.m:2:9: fatal error: 'ObjcSwiftNinja-Swift.h' file not found
#import "ObjcSwiftNinja-Swift.h"
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
Minimal sample project: https://github.com/Coeur/ObjcSwiftNinja
The CMakeList.txt is as minimal as possible to highlight the issue:
https://github.com/Coeur/ObjcSwiftNinja/blob/97d926d454a8210731b42ddcc92c3a7fbc72ff9a/CMakeLists.txt
The README gives what works and what fails.
Succeeds:
```
cmake -B build -G Xcode
xcodebuild -project build/ObjcSwiftNinja.xcodeproj -target ObjcSwiftNinja-app
```
Fails:
```
cmake -B build -G Ninja
ninja -C build ObjcSwiftNinja-app
```
I've opened an issue at ninja, but they closed it and said it was a cmake issue: https://github.com/ninja-build/ninja/issues/2261https://gitlab.kitware.com/cmake/cmake/-/issues/23984XCTest Framework imported in Swift when using Ninja as generator2024-02-03T18:56:26-05:00Lars SundströmXCTest Framework imported in Swift when using Ninja as generatorI'm working on a project where we build a shared framework in Objective C/ C / C++.
The project is setup using CMake and this toolchain file https://github.com/leetal/ios-cmake to create libraries for different Apple devices.
Everything ...I'm working on a project where we build a shared framework in Objective C/ C / C++.
The project is setup using CMake and this toolchain file https://github.com/leetal/ios-cmake to create libraries for different Apple devices.
Everything works well building the library when using Xcode or Ninja as generator.
The framework is built as a module to be imported in a Swift application.
As a reference we're implementing unit tests of the framework in Swift to show the App team how to utilise it.
In CMakeLists we setup XCTest according to your instructions and if using Xcode as generator it works properly. All good there, but when using Ninja as generator a problem arises when linking the Swift test target due to:
```
error: cannot find 'XCTAssert' in scope
^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestAssertions.h:72:9: note: macro 'XCTAssert' not imported: function like macros not supported
#define XCTAssert(expression, ...) \
error: cannot find 'XCTAssertNotNil' in scope
^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTestAssertions.h:63:9: note: macro 'XCTAssertNotNil' not imported: function like macros not supported
```
and so on. To be able to run the unit tests on the host machine I'm compiling the framework using Mac Catalyst support (the framework has a dependency to UIKit).
As seen above it looks like the Swift target is trying to use the XCTest framework instead of the XCTestSwiftSupport library. I've done some reading on this and found https://forums.swift.org/t/missing-libxctestswiftsupport-dylib/35314/8
Now I don't know what the Xcode property "Enable Testing Search Paths" does but either way it doesn't matter when using Ninja.
So in some way I would like the linker to use the XCTestSwiftSupport library instead. I've tried to modify the linker properties but without any luck, the Framework seems to be checked first.
Thanks for your fantastic work.https://gitlab.kitware.com/cmake/cmake/-/issues/22837Xcode: Support Swift Package dependencies2021-12-17T04:38:17-05:00Mike AchtelikXcode: Support Swift Package dependenciesXcode allows adding swift package dependencies to an Xcode project via the swift package manager ([see here](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app)).
That way Xcode will automati...Xcode allows adding swift package dependencies to an Xcode project via the swift package manager ([see here](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app)).
That way Xcode will automatically fetch, build and embed xcframeworks hosted in a git repo into the project.
This allows for easier code sharing than simply adding frameworks, as Xcode does all the work of fetching the remote frameworks, it would be nice if CMake could support declaring those dependencies.https://gitlab.kitware.com/cmake/cmake/-/issues/22309Swift: sdk flag support for swift compiler2021-06-16T10:25:04-04:00Semyon KoltonSwift: sdk flag support for swift compilerThere's a comment regarding `-sdk` support in Swift compiler [here](https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/CMakeSwiftInformation.cmake#L43):
```
# NOTE(compnerd) the `-sdk` support is not yet ready in the compiler; ...There's a comment regarding `-sdk` support in Swift compiler [here](https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/CMakeSwiftInformation.cmake#L43):
```
# NOTE(compnerd) the `-sdk` support is not yet ready in the compiler; when that
# is fully working, we should be able to enable this.
# set(CMAKE_Swift_COMPILE_OPTIONS_SYSROOT "-sdk ")
```
Is it still actual? Looks like Apple tools are already using this argument.
Seems that #19880 is relatedhttps://gitlab.kitware.com/cmake/cmake/-/issues/21436Issues with Swift CMAKE_TRY_COMPILE for Mac Catalyst targets2021-01-14T18:28:27-05:00Chris BallingerIssues with Swift CMAKE_TRY_COMPILE for Mac Catalyst targetsRelated issue: https://gitlab.kitware.com/cmake/cmake/-/issues/20132
The issue here is that the second `-target x86_64-apple-macos10.12` flag (coming from somewhere unknown) is overriding the `-target x86_64-apple-ios13.0-macabi` we are...Related issue: https://gitlab.kitware.com/cmake/cmake/-/issues/20132
The issue here is that the second `-target x86_64-apple-macos10.12` flag (coming from somewhere unknown) is overriding the `-target x86_64-apple-ios13.0-macabi` we are passing in `CMAKE_Swift_FLAGS` (which translates to `OTHER_SWIFT_FLAGS` in Xcode).
See in log below:
```
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'cmTC_15e27' from project 'CMAKE_TRY_COMPILE')
cd /Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp
export DEVELOPER_DIR\=/Applications/Xcode-12.1.1.app/Contents/Developer
export SDKROOT\=/Applications/Xcode-12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
/Applications/Xcode-12.1.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name cmTC_15e27 -O -enable-batch-mode -enforce-exclusivity\=checked @/Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_15e27.build/Objects-normal/x86_64/cmTC_15e27.SwiftFileList -target x86_64-apple-ios13.0-macabi -sdk /Applications/Xcode-12.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -target x86_64-apple-macos10.12 -g -module-cache-path /Users/chrisbal/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -swift-version 4 -I /Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp/Debug -F /Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp/Debug -c -j12 -output-file-map /Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_15e27.build/Objects-normal/x86_64/cmTC_15e27-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_15e27.build/Objects-normal/x86_64/cmTC_15e27.swiftmodule -Xcc -I/Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_15e27.build/swift-overrides.hmap -Xcc -I/Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp/Debug/include -Xcc -I/Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_15e27.build/DerivedSources-normal/x86_64 -Xcc -I/Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_15e27.build/DerivedSources/x86_64 -Xcc -I/Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_15e27.build/DerivedSources -Xcc -DCMAKE_INTDIR\=\"Debug\" -emit-objc-header -emit-objc-header-path /Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTC_15e27.build/Objects-normal/x86_64/cmTC_15e27-Swift.h -working-directory /Users/chrisbal/Documents/opencv-build/build/build-x86_64-catalyst/modules/objc/framework_build/CMakeFiles/CMakeTmp
```
What is possibly a related issue, is that it's not valid to make command line tools for iOS-style targets (like Catalyst), which is what this `CMAKE_TRY_COMPILE` project is doing.
I even tried forcing the target destination to `platform=macOS,arch=x86_64,variant=Mac Catalyst`, but it didn't have any effect:
```
$ xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj/ -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' build
```
I've attached the `CMAKE_TRY_COMPILE.xcodeproj` as CMakeTmp.zip below, which may help diagnosing this issue.
[CMakeError.log](/uploads/1f0d66248466d0d93264909138e030f0/CMakeError.log)
[CMakeOutput.log](/uploads/11261f3a26fdb5d84bf2192deaa268dd/CMakeOutput.log)
[CMakeTmp.zip](/uploads/1b2467e514f975ceafdb40d02495784e/CMakeTmp.zip)
You can reproduce with the following (see [WIP PR here](https://github.com/Rightpoint/opencv/pull/3)):
```
$ git clone https://github.com/Rightpoint/opencv.git
$ cd opencv
$ git checkout feature/chrisballinger/build-catalyst-xcframework
$ python3 platforms/osx/build_framework.py --catalyst_archs x86_64 --build-only-specified-archs ../opencv-build/
```
In the meantime I am going to try working around the issue by not overriding `CMAKE_EXE_LINKER_FLAGS` (which includes passing `-target x86_64-apple-ios13.0-macabi` to `LDFLAGS`) and injecting that manually via the `xcodebuild` command after CMake has finished project generation.https://gitlab.kitware.com/cmake/cmake/-/issues/20642Support Swift Module Detection2020-04-28T14:35:26-04:00Saleem AbdulrasoolSupport Swift Module DetectionSimilar to `find_library` it might be nice to have a `find_swift_module` or something along that lines to check if the current system/flags/SDK contain a particular module.
It is probably best done as a compile+link test (run test is un...Similar to `find_library` it might be nice to have a `find_swift_module` or something along that lines to check if the current system/flags/SDK contain a particular module.
It is probably best done as a compile+link test (run test is unnecessary and would also be annoying for cross-compiling).
@brad.king suggestions on naming/approaches?https://gitlab.kitware.com/cmake/cmake/-/issues/20461Swift: building macOS fails, unable to load standard library for target 'x86_...2020-03-30T16:12:39-04:00Adrian ZimmermannSwift: building macOS fails, unable to load standard library for target 'x86_64-apple-macosx10.14'When I try to build this project: [https://github.com/compnerd/swift-build-examples/tree/master/HelloMinimal-CMake](https://github.com/compnerd/swift-build-examples/tree/master/HelloMinimal-CMake)
the following errors occurs during the ...When I try to build this project: [https://github.com/compnerd/swift-build-examples/tree/master/HelloMinimal-CMake](https://github.com/compnerd/swift-build-examples/tree/master/HelloMinimal-CMake)
the following errors occurs during the compiler test:
```
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -target x86_64-apple-macosx10.14 -output-file-map CMakeFiles/cmTC_a3200.dir/output-file-map.json -incremental -j 12 -emit-executable -o cmTC_a3200 -emit-module -emit-module-path cmTC_a3200.swiftmodule -emit-dependencies main.swift && :
<unknown>:0: error: unable to load standard library for target 'x86_64-apple-macosx10.14'`
```
After including `set(CMAKE_Swift_COMPILER_WORKS True)` before project()
and applying this fix (-sdk option): [https://gitlab.kitware.com/cmake/cmake/issues/19880](https://gitlab.kitware.com/cmake/cmake/issues/19880)
this is the output:
```
FAILED: libHiKit.a CMakeFiles/HiKit.dir/hikit.swift.o HiKit.swiftmodule
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -target x86_64-apple-macosx10.15 -output-file-map CMakeFiles/HiKit.dir/output-file-map.json -incremental -j 12 -emit-library -static -o libHiKit.a -module-name HiKit -module-link-name HiKit -emit-module -emit-module-path HiKit.swiftmodule -emit-dependencies -O -g ../hikit.swift && :
error: cannot parse the debug map for 'libHiKit.a': The file was not recognized as a valid object file
<unknown>:0: error: generate-dSYM command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
```
https://gitlab.kitware.com/cmake/cmake/-/issues/20325Ninja generator does't work with mixed Swift project2021-01-14T18:28:27-05:00Anthony IlinykhNinja generator does't work with mixed Swift projectI'm trying to build a [SwiftMix](https://gitlab.kitware.com/cmake/cmake/tree/master/Tests/SwiftMix) test project with Ninja 1.9 and looks like this is not possible for now. I believe the reason is that the _object compilation phase_ was ...I'm trying to build a [SwiftMix](https://gitlab.kitware.com/cmake/cmake/tree/master/Tests/SwiftMix) test project with Ninja 1.9 and looks like this is not possible for now. I believe the reason is that the _object compilation phase_ was [missed](https://gitlab.kitware.com/cmake/cmake/issues/18800#note_512940) and all the (mixed) sources goes to compiler (swiftc) directly
Let's look more precisely.
#### Using Ninja Generator
<details>
<summary>cmake -GNinja -Bbuild && cmake --build build/ -- -w dupbuild=warn</summary>
<pre><code>~/Desktop/CMake/Tests/SwiftMix(master) $ rm -rf build/ && cmake -DCMAKE_VERBOSE_MAKEFILE=ON -GNinja -Bbuild && cmake --build build/ -- -w dupbuild=warn
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The Swift compiler identification is Apple 5.1.3
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- CMAKE_Swift_COMPILER_ID: Apple
-- Check for working Swift compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
-- Check for working Swift compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -- works
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build
ninja: warning: multiple rules generate CMakeFiles/SwiftMix.dir/CMain.c.o. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate CMakeFiles/SwiftMix.dir/ObjCMain.m.o. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
[1/1] : && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -output-file-map CMakeFiles/SwiftMix.dir/output-file-map.json -incremental -j 12 -emit-executable -o SwiftMix -emit-module -emit-module-path SwiftMix.swiftmodule -emit-dependencies -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk ../CMain.c ../ObjCMain.m ../SwiftMain.swift -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib && :
ld: warning: ignoring file ../CMain.c, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x65 0x78 0x74 0x65 0x72 0x6E 0x20 0x69 0x6E 0x74 0x20 0x4F 0x62 0x6A 0x43 0x4D )
ld: warning: ignoring file ../ObjCMain.m, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x23 0x69 0x6D 0x70 0x6F 0x72 0x74 0x20 0x22 0x53 0x77 0x69 0x66 0x74 0x4D 0x69 )
~/Desktop/CMake/Tests/SwiftMix(master) $ </code></pre>
</details>
Note, that i have passed `-w dupbuild=warn` to Ninja (#20181)
It seems that linker does not accept sources `../CMain.c` and `../ObjCMain.m` into final executable and it builds but not works properly.
#### Using Xcode Generator
<details>
<summary>cmake -GXcode -Bbuild && cmake --build build/</summary>
<pre><code>
~/Desktop/CMake/Tests/SwiftMix(master) $ rm -rf build/ && cmake -DCMAKE_VERBOSE_MAKEFILE=ON -GXcode -Bbuild && cmake --build build/
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The Swift compiler identification is Apple 5.1.3
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- CMAKE_Swift_COMPILER_ID: Apple
-- Check for working Swift compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift
-- Check for working Swift compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -- works
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build
User defaults from command line:
HideShellScriptEnvironment = YES
Prepare build
note: Using legacy build system
=== BUILD AGGREGATE TARGET ZERO_CHECK OF PROJECT SwiftMix WITH CONFIGURATION Debug ===
Check dependencies
Write auxiliary files
write-file /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/ZERO_CHECK.build/Script-A03951E644024FC69B2D5371.sh
chmod 0755 /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/ZERO_CHECK.build/Script-A03951E644024FC69B2D5371.sh
PhaseScriptExecution CMake\ Rules build/SwiftMix.build/Debug/ZERO_CHECK.build/Script-A03951E644024FC69B2D5371.sh
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/bin/sh -c /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/ZERO_CHECK.build/Script-A03951E644024FC69B2D5371.sh
echo ""
make -f /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/CMakeScripts/ReRunCMake.make
make[1]: `/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/CMakeFiles/cmake.check_cache' is up to date.
=== BUILD TARGET SwiftMix OF PROJECT SwiftMix WITH CONFIGURATION Debug ===
Check dependencies
Write auxiliary files
/bin/mkdir -p /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64
write-file /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix.LinkFileList
write-file /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix-OutputFileMap.json
write-file /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/swift-overrides.hmap
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name SwiftMix -O -enable-batch-mode -enforce-exclusivity=checked -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -target x86_64-apple-macos10.14 -g -Xfrontend -serialize-debugging-options -swift-version 4 -I /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -F /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -parse-as-library -c -j12 /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/SwiftMain.swift -output-file-map /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix.swiftmodule -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/swift-overrides.hmap -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug/include -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources-normal/x86_64 -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources/x86_64 -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources -Xcc -DCMAKE_INTDIR=\"Debug\" -emit-objc-header -emit-objc-header-path /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix-Swift.h -import-objc-header /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/ObjC-Swift.h -pch-output-dir /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SharedPrecompiledHeaders -working-directory /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
PrecompileSwiftBridgingHeader normal x86_64
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -target x86_64-apple-macos10.14 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -F /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -g -swift-version 4 -enforce-exclusivity=checked -O -serialize-debugging-options -Xcc -working-directory -Xcc /Users/ailinykh/Desktop/CMake/Tests/SwiftMix -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/swift-overrides.hmap -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug/include -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources-normal/x86_64 -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources/x86_64 -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources -Xcc "-DCMAKE_INTDIR=\"Debug\"" -serialize-diagnostics-path /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SharedPrecompiledHeaders/ObjC-Swift-SLBB84X5ZYT1.dia /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/ObjC-Swift.h -emit-pch -pch-output-dir /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SharedPrecompiledHeaders
CompileSwift normal x86_64 /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/SwiftMain.swift
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/SwiftMain.swift -emit-module-path /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMain~partial.swiftmodule -emit-module-doc-path /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMain~partial.swiftdoc -serialize-diagnostics-path /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMain.dia -emit-dependencies-path /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMain.d -emit-reference-dependencies-path /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMain.swiftdeps -target x86_64-apple-macos10.14 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -F /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -g -swift-version 4 -enforce-exclusivity=checked -O -serialize-debugging-options -Xcc -working-directory -Xcc /Users/ailinykh/Desktop/CMake/Tests/SwiftMix -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/swift-overrides.hmap -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug/include -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources-normal/x86_64 -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources/x86_64 -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources -Xcc "-DCMAKE_INTDIR=\"Debug\"" -import-objc-header /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/ObjC-Swift.h -pch-output-dir /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SharedPrecompiledHeaders -pch-disable-validation -parse-as-library -module-name SwiftMix -o /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMain.o
MergeSwiftModule normal x86_64 /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix.swiftmodule
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -merge-modules -emit-module /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMain~partial.swiftmodule -parse-as-library -sil-merge-partial-modules -disable-diagnostic-passes -disable-sil-perf-optzns -target x86_64-apple-macos10.14 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -F /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -g -swift-version 4 -enforce-exclusivity=checked -O -serialize-debugging-options -Xcc -working-directory -Xcc /Users/ailinykh/Desktop/CMake/Tests/SwiftMix -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/swift-overrides.hmap -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug/include -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources-normal/x86_64 -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources/x86_64 -Xcc -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources -Xcc "-DCMAKE_INTDIR=\"Debug\"" -emit-module-doc-path /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix.swiftdoc -emit-objc-header-path /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix-Swift.h -import-objc-header /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/ObjC-Swift.h -module-name SwiftMix -o /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix.swiftmodule
Ditto build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources/SwiftMix-Swift.h build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix-Swift.h
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/usr/bin/ditto -rsrc /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix-Swift.h /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources/SwiftMix-Swift.h
CompileC build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/CMain.o CMain.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -target x86_64-apple-macos10.14 -fmessage-length=234 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DCMAKE_INTDIR=\"Debug\" -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug/include -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources-normal/x86_64 -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources/x86_64 -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -Werror=objc-method-access -MMD -MT dependencies -MF /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/CMain.d --serialize-diagnostics /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/CMain.dia -c /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/CMain.c -o /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/CMain.o
Ditto build/Debug/SwiftMix.swiftmodule/x86_64.swiftmodule build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix.swiftmodule
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/usr/bin/ditto -rsrc /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix.swiftmodule /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug/SwiftMix.swiftmodule/x86_64.swiftmodule
Ditto build/Debug/SwiftMix.swiftmodule/x86_64.swiftdoc build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix.swiftdoc
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/usr/bin/ditto -rsrc /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix.swiftdoc /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug/SwiftMix.swiftmodule/x86_64.swiftdoc
CompileC build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/ObjCMain.o ObjCMain.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-macos10.14 -fmessage-length=234 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-implicit-atomic-properties -Wno-objc-interface-ivars -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DCMAKE_INTDIR=\"Debug\" -DOBJC_OLD_DISPATCH_PROTOTYPES=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug/include -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources-normal/x86_64 -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources/x86_64 -I/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -Werror=objc-method-access -MMD -MT dependencies -MF /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/ObjCMain.d --serialize-diagnostics /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/ObjCMain.dia -c /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/ObjCMain.m -o /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/ObjCMain.o
Ld build/Debug/SwiftMix normal x86_64
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -rpath -Xlinker /usr/lib/swift -target x86_64-apple-macos10.14 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -L/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/Debug -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib -F/Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug -filelist /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix.LinkFileList -Xlinker -object_path_lto -Xlinker /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix_lto.o -Xlinker -no_deduplicate -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix.swiftmodule -Xlinker -dependency_info -Xlinker /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/Objects-normal/x86_64/SwiftMix_dependency_info.dat -o /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug/SwiftMix
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/Debug'
ProcessProductPackaging "" build/SwiftMix.build/Debug/SwiftMix.build/SwiftMix.xcent
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
Entitlements:
{
"com.apple.security.get-task-allow" = 1;
}
builtin-productPackagingUtility -entitlements -format xml -o /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/SwiftMix.xcent
CodeSign build/Debug/SwiftMix
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
Signing Identity: "-"
/usr/bin/codesign --force --sign - --entitlements /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/SwiftMix.build/SwiftMix.xcent --timestamp=none /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/Debug/SwiftMix
=== BUILD AGGREGATE TARGET ALL_BUILD OF PROJECT SwiftMix WITH CONFIGURATION Debug ===
Check dependencies
Write auxiliary files
write-file /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/ALL_BUILD.build/Script-0CBD7456C2CB407E87C6D826.sh
chmod 0755 /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/ALL_BUILD.build/Script-0CBD7456C2CB407E87C6D826.sh
PhaseScriptExecution CMake\ Rules build/SwiftMix.build/Debug/ALL_BUILD.build/Script-0CBD7456C2CB407E87C6D826.sh
cd /Users/ailinykh/Desktop/CMake/Tests/SwiftMix
/bin/sh -c /Users/ailinykh/Desktop/CMake/Tests/SwiftMix/build/SwiftMix.build/Debug/ALL_BUILD.build/Script-0CBD7456C2CB407E87C6D826.sh
echo ""
echo Build\ all\ projects
Build all projects
** BUILD SUCCEEDED **
~/Desktop/CMake/Tests/SwiftMix(master) $
</code></pre>
</details>
And it's succeeded.
It happens because of there is more compiler stages. And it uses `clang` to compile `.c` and `.m` sources
@compnerd what do you think?https://gitlab.kitware.com/cmake/cmake/-/issues/20104Swift compiler check fails on cmake >= 3.16 with Ninja generator when cross c...2020-01-29T12:04:41-05:00JehanSwift compiler check fails on cmake >= 3.16 with Ninja generator when cross compiling for IOSSince version 3.16, swift compiler detection no longer work for Ninja in case of cross compilation
It can be reproduced with a very simple [CMakeLists.txt](/uploads/f3c622543b9456e6e18a6271b2f664b8/CMakeLists.txt)
```
cmake ../ -GNin...Since version 3.16, swift compiler detection no longer work for Ninja in case of cross compilation
It can be reproduced with a very simple [CMakeLists.txt](/uploads/f3c622543b9456e6e18a6271b2f664b8/CMakeLists.txt)
```
cmake ../ -GNinja -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES="armv7;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=9.3
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The Swift compiler identification is Apple 5.0.1
-- Check for working Swift compiler: /Applications/Xcode10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
-- Check for working Swift compiler: /Applications/Xcode10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -- broken
CMake Error at /usr/local/Cellar/cmake/3.16.1/share/cmake/Modules/CMakeTestSwiftCompiler.cmake:41 (message):
The Swift compiler
"/Applications/Xcode10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /tmp/build2/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/local/bin/ninja cmTC_6cd27 && [1/1] Linking Swift executable cmTC_6cd27.app/cmTC_6cd27
FAILED: cmTC_6cd27.app/cmTC_6cd27 CMakeFiles/cmTC_6cd27.dir/main.swift.o cmTC_6cd27.swiftmodule
: && /Applications/Xcode10.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -output-file-map CMakeFiles/cmTC_6cd27.dir/output-file-map.json -incremental -j 8 -emit-executable -o cmTC_6cd27.app/cmTC_6cd27 -emit-module -emit-module-path cmTC_6cd27.swiftmodule -emit-dependencies -sdk /Applications/Xcode10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk -sdk /Applications/Xcode10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk main.swift && :
<unknown>:0: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX'
<unknown>:0: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX'
ld: warning: ignoring file /Applications/Xcode10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk/usr/lib/libobjc.tbd, missing required architecture x86_64 in file /Applications/Xcode10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk/usr/lib/libobjc.tbd (4 slices)
ld: warning: ignoring file /Applications/Xcode10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk/usr/lib/libSystem.tbd, missing required architecture x86_64 in file /Applications/Xcode10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk/usr/lib/libSystem.tbd (4 slices)
ld: symbol dyld_stub_binder not found (normally in libSystem.dylib). Needed to perform lazy binding to function _$sSS21_builtinStringLiteral17utf8CodeUnitCount7isASCIISSBp_BwBi1_tcfC for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:36 (enable_language)
-- Configuring incomplete, errors occurred!
See also "/tmp/build2/CMakeFiles/CMakeOutput.log".
See also "/tmp/build2/CMakeFiles/CMakeError.log".
```https://gitlab.kitware.com/cmake/cmake/-/issues/19877Swift: WIN32_EXECUTABLE property is not supported2021-10-28T15:34:31-04:00ewmailingSwift: WIN32_EXECUTABLE property is not supportedI am trying out CMake 3.16.0rc1 with a Swift project.
I have a cross-platform project (Mac, Windows, Linux, iOS, Android) that uses
ADD_EXECUTABLE(${USER_EXECUTABLE_TARGET}
MACOSX_BUNDLE
WIN32
...
)
In prior versions, thi...I am trying out CMake 3.16.0rc1 with a Swift project.
I have a cross-platform project (Mac, Windows, Linux, iOS, Android) that uses
ADD_EXECUTABLE(${USER_EXECUTABLE_TARGET}
MACOSX_BUNDLE
WIN32
...
)
In prior versions, this worked for me, but when I build for iOS (using one of the iOS toolchains floating around), the WIN32 parameter now gives me a hard error:
WIN32_EXECUTABLE property is not supported on Swift executables
Call Stack (most recent call first):
CMakeLists.txt:28 (INCLUDE)
So I have several problems with this:
1. The WIN32 flag should be completely ignored on non-Windows systems. (It is ignored for Mac, but not iOS, so maybe the toolchain I use needs something added? If so, I would really appreciate it if you would tell me.)
2. I think the WIN32 flag should be respected with Swift/Windows. In my original experiments, I used SDL as my foundation for a Swift app, and SDL (in C) defines WinMain. I have done some other things similar with non-SDL projects to get GUI based apps working with Swift. At the very least, it is unclear to my why CMake makes a distinction for this flag, especially when C/C++ files can co-exist/inter-mix with Swift files in a single project.
3. At the very least, I feel this should be a warning instead of a hard error while Swift on Windows is still heavily evolving.https://gitlab.kitware.com/cmake/cmake/-/issues/19676Swift applications are not debuggable by default2022-08-26T23:06:41-04:00Stephen H. GerstackerSwift applications are not debuggable by defaultI created a simple macOS application with the default storyboard and view controller. Setting breakpoints did not work at all in Swift. The project had a separate C-based library, and breakpoints worked within C files. I had to add the t...I created a simple macOS application with the default storyboard and view controller. Setting breakpoints did not work at all in Swift. The project had a separate C-based library, and breakpoints worked within C files. I had to add the target properties to make breakpoints work. I tried to keep these settings as close to a stock Xcode project as possible.
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=Debug] "YES"
XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Debug] "dwarf"
XCODE_ATTRIBUTE_ENABLE_TESTIBILITY[variant=Debug] "YES"
XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS "YES"
XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL "s"
XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL[variant=Debug] "0"
XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "NO"
XCODE_ATTRIBUTE_CLANG_ENABLE_MODULES YES
XCODE_ATTRIBUTE_SWIFT_OPTIMIZATION_LEVEL "-Owholemodule"
XCODE_ATTRIBUTE_SWIFT_OPTIMIZATION_LEVEL[variant=Debug] "-Onone"https://gitlab.kitware.com/cmake/cmake/-/issues/19443Swift: compile_commands.json contains invalid `"command": ":"`2020-07-02T22:49:39-04:00Ben LangmuirSwift: compile_commands.json contains invalid `"command": ":"`Swift files have an incorrect `"command"` entry in generated compilation databases (compile_commands.json) when using `-DCMAKE_EXPORT_COMPILE_COMMANDS=1`.
```
{
"directory": "/tmp/swift-cmake-demo/build",
"command": ":",
"file": "...Swift files have an incorrect `"command"` entry in generated compilation databases (compile_commands.json) when using `-DCMAKE_EXPORT_COMPILE_COMMANDS=1`.
```
{
"directory": "/tmp/swift-cmake-demo/build",
"command": ":",
"file": "/tmp/swift-cmake-demo/Source/HelloWorld/HelloWorld.swift"
}
```
Reproduced using `cmake-3.15.0-rc3-Darwin-x86_64`:
```sh
$ git clone https://github.com/compnerd/swift-cmake-demo.git
$ cd swift-cmake-demo/
$ mkdir build && cd build
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
-- The C compiler identification is AppleClang 11.0.0.11000020
-- The Swift compiler identification is Apple 5.1
-- Check for working C compiler: /Xcodes/11.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Xcodes/11.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working Swift compiler: /Xcodes/11.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
-- Check for working Swift compiler: /Xcodes/11.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -- works
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/swift-cmake-demo/build
$ ninja
[4/4] Linking Swift executable Source/HelloWorld/HelloWorld
$ cat compile_commands.json
[
{
"directory": "/tmp/swift-cmake-demo/build",
"command": "/Xcodes/11.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DL_EXPORTS -g -isysroot /Xcodes/11.0/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -fPIC -o Source/CLibrary/CMakeFiles/L.dir/Library.c.o -c /tmp/swift-cmake-demo/Source/CLibrary/Library.c",
"file": "/tmp/swift-cmake-demo/Source/CLibrary/Library.c"
},
{
"directory": "/tmp/swift-cmake-demo/build",
"command": ":",
"file": "/tmp/swift-cmake-demo/Source/HelloWorldCore/_HelloWorldCore.swift"
},
{
"directory": "/tmp/swift-cmake-demo/build",
"command": ":",
"file": "/tmp/swift-cmake-demo/Source/HelloWorldCore/HelloWorldCore.swift"
},
{
"directory": "/tmp/swift-cmake-demo/build",
"command": ":",
"file": "/tmp/swift-cmake-demo/Source/HelloWorld/HelloWorld.swift"
}
]
```https://gitlab.kitware.com/cmake/cmake/-/issues/19284Swift: improve Swift install flow2020-01-30T00:49:55-05:00Saleem AbdulrasoolSwift: improve Swift install flowWhen building a Swift library, there are "auxiliary" files that must be dealt with. A `swiftmodule` and `swiftdoc` file will be generated and placed into the location specified by the `Swift_MODULE_DIRECTORY` property (which defaults to...When building a Swift library, there are "auxiliary" files that must be dealt with. A `swiftmodule` and `swiftdoc` file will be generated and placed into the location specified by the `Swift_MODULE_DIRECTORY` property (which defaults to `CMAKE_Swift_MODULE_DIRECTORY`). When installing this target, these files must be propagated to the installed image. Currently, this requires manually installing the files as well as computing the location for the installation. The way that the destination path for these file is calculated is as follows:
```cmake
lib/$<OR:$<$<BOOL:$<BUILD_SHARED_LIBS>>:swift>,swift_static>/$<LOWER_CASE:CMAKE_SYSTEM_NAME>/$<LOWER_CASE:CMAKE_SYSTEM_PROCESSOR>
```
This is not entirely accurate as the `CMAKE_SYSTEM_PROCESSOR` is sometimes renamed as follows:
* ppc64 -> powerpc64
* ppc64le -> powerpc64le
* armv6l -> armv6
* armv7l -> armv7
* AMD64 -> x86_64
* IA64 -> itanium
* x86 -> i686
Having these be installed much like interface libraries on Windows would make the install step definition much more concise and easy.https://gitlab.kitware.com/cmake/cmake/-/issues/19283Add support for Swift for Makefile generator2019-05-21T11:47:18-04:00Saleem AbdulrasoolAdd support for Swift for Makefile generatorCMake currently only supports the Ninja generator (and Xcode generator) for Swift. It should be possible to support the Makefile generator as well.CMake currently only supports the Ninja generator (and Xcode generator) for Swift. It should be possible to support the Makefile generator as well.