diff options
Diffstat (limited to 'Modules/CMakeTestCXXCompiler.cmake')
-rw-r--r-- | Modules/CMakeTestCXXCompiler.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake index fe6bd25..7e595b7 100644 --- a/Modules/CMakeTestCXXCompiler.cmake +++ b/Modules/CMakeTestCXXCompiler.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 CMakeCXXCompiler.cmake. unset(CMAKE_CXX_COMPILER_WORKS CACHE) @@ -79,4 +85,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_CXX_COMPILER_OUTPUT) |