diff options
author | Brad King <brad.king@kitware.com> | 2019-10-16 13:43:26 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-10-16 13:45:11 (GMT) |
commit | e0e109611a7c22ea4fe80cac38ba495ec19d1e07 (patch) | |
tree | c13a8b5d30d6f37ba66aace348a440d604252d71 | |
parent | 4abdb1900aa47d714633f8ec9576d76781ee2f79 (diff) | |
parent | 466ad466b44561c8d48360fed0e491b3c09313be (diff) | |
download | CMake-e0e109611a7c22ea4fe80cac38ba495ec19d1e07.zip CMake-e0e109611a7c22ea4fe80cac38ba495ec19d1e07.tar.gz CMake-e0e109611a7c22ea4fe80cac38ba495ec19d1e07.tar.bz2 |
Merge topic 'swift-cross-compile'
466ad466b4 try_compile: support Swift for cross-compilation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3921
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 515f446..910cc9d 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -56,6 +56,8 @@ static std::string const kCMAKE_POSITION_INDEPENDENT_CODE = static std::string const kCMAKE_SYSROOT = "CMAKE_SYSROOT"; static std::string const kCMAKE_SYSROOT_COMPILE = "CMAKE_SYSROOT_COMPILE"; static std::string const kCMAKE_SYSROOT_LINK = "CMAKE_SYSROOT_LINK"; +static std::string const kCMAKE_Swift_COMPILER_TARGET = + "CMAKE_Swift_COMPILER_TARGET"; static std::string const kCMAKE_TRY_COMPILE_OSX_ARCHITECTURES = "CMAKE_TRY_COMPILE_OSX_ARCHITECTURES"; static std::string const kCMAKE_TRY_COMPILE_PLATFORM_VARIABLES = @@ -671,6 +673,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv, vars.insert(kCMAKE_SYSROOT); vars.insert(kCMAKE_SYSROOT_COMPILE); vars.insert(kCMAKE_SYSROOT_LINK); + vars.insert(kCMAKE_Swift_COMPILER_TARGET); vars.insert(kCMAKE_WARN_DEPRECATED); vars.emplace("CMAKE_MSVC_RUNTIME_LIBRARY"_s); |