diff options
author | Evan Wilde <etceterawilde@gmail.com> | 2022-10-14 17:18:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-24 16:39:21 (GMT) |
commit | 3fc971c38b3aba4d2b216d31a1e6ced9cda2bf4a (patch) | |
tree | 4440d5ec5ce39db1a37014ecc7c65b38f34e24f2 /Help/guide/tutorial/Step6/tutorial.cxx | |
parent | 2345139ab5b93cea4cf331af8d840ed5f943dbeb (diff) | |
download | CMake-3fc971c38b3aba4d2b216d31a1e6ced9cda2bf4a.zip CMake-3fc971c38b3aba4d2b216d31a1e6ced9cda2bf4a.tar.gz CMake-3fc971c38b3aba4d2b216d31a1e6ced9cda2bf4a.tar.bz2 |
CheckSourceCompiles: For Swift executable, name source 'main.swift'
Xcode uses its own heuristics to determine whether or not to accept
top-level code in a source file while Ninja uses the swift driver
heuristics.
With the Swift driver, if the module contains a single file, that file
will be parsed as a top-level code context. With Xcode, the single file
will only be parsed as top-level code if the name of that file is
'main.swift'.
To ensure more consistent behavior between the two generators, if we're
building Swift and the try-compile target type is executable or
undefined, we name the file `main.swift` to ensure that both will handle
the single file as top-level code.
Diffstat (limited to 'Help/guide/tutorial/Step6/tutorial.cxx')
0 files changed, 0 insertions, 0 deletions