diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2018-01-15 21:21:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-04 14:03:35 (GMT) |
commit | 11da882a1293b39ddd054342b1e6f2f3bd1bc934 (patch) | |
tree | 187dc31245841919d54a28a566b5e0e8550c6980 /Modules/CMakeTestCCompiler.cmake | |
parent | 36cf44a7a3a8931c97790db6df61439d4dd86ea3 (diff) | |
download | CMake-11da882a1293b39ddd054342b1e6f2f3bd1bc934.zip CMake-11da882a1293b39ddd054342b1e6f2f3bd1bc934.tar.gz CMake-11da882a1293b39ddd054342b1e6f2f3bd1bc934.tar.bz2 |
Apple: Introduce separate system name for iOS, tvOS, and watchOS
- Remove code signing requirements for non-macOS
- Do not set deployment target for non-macOS
- Build static library for compiler feature detection for non-macOS
- Use framework to run CompilerId tests for watchOS
- Port tests to new SDK handling
- Add new Apple cross-compiling section to toolchain documentation
Closes: #17870
Diffstat (limited to 'Modules/CMakeTestCCompiler.cmake')
-rw-r--r-- | Modules/CMakeTestCCompiler.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake index f74a1c6..7bf6fde 100644 --- a/Modules/CMakeTestCCompiler.cmake +++ b/Modules/CMakeTestCCompiler.cmake @@ -11,6 +11,12 @@ endif() include(CMakeTestCompilerCommon) +# work around enforced code signing and / or missing exectuable target type +set(__CMAKE_SAVED_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE}) +if(_CMAKE_FEATURE_DETECTION_TARGET_TYPE) + set(CMAKE_TRY_COMPILE_TARGET_TYPE ${_CMAKE_FEATURE_DETECTION_TARGET_TYPE}) +endif() + # Remove any cached result from an older CMake version. # We now store this in CMakeCCompiler.cmake. unset(CMAKE_C_COMPILER_WORKS CACHE) @@ -86,4 +92,6 @@ else() endif() endif() +set(CMAKE_TRY_COMPILE_TARGET_TYPE ${__CMAKE_SAVED_TRY_COMPILE_TARGET_TYPE}) +unset(__CMAKE_SAVED_TRY_COMPILE_TARGET_TYPE) unset(__CMAKE_C_COMPILER_OUTPUT) |