summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-28 15:52:31 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-28 15:52:31 (GMT)
commitc10c9f839aca3f630212869ac6738963c0e3e77e (patch)
treef88594b96bd6738d99a3c176d30529da0ad08a10 /Modules/Platform
parent92780281c2e8a46223b262b152caa9c8329373b1 (diff)
downloadCMake-c10c9f839aca3f630212869ac6738963c0e3e77e.zip
CMake-c10c9f839aca3f630212869ac6738963c0e3e77e.tar.gz
CMake-c10c9f839aca3f630212869ac6738963c0e3e77e.tar.bz2
Swift: Honor CMAKE_OSX_SYSROOT on Apple platforms
Pass the value to the Swift compiler driver via `-sdk`. We already do this for C/C++ via `-isysroot`. This fixes command-line builds on macOS 10.15 with Xcode 11 Swift tools. Fixes: #19880
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Apple-Apple-Swift.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/Platform/Apple-Apple-Swift.cmake b/Modules/Platform/Apple-Apple-Swift.cmake
new file mode 100644
index 0000000..7ca3e36
--- /dev/null
+++ b/Modules/Platform/Apple-Apple-Swift.cmake
@@ -0,0 +1 @@
+set(CMAKE_Swift_SYSROOT_FLAG "-sdk")