diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2018-11-19 16:23:45 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2018-12-01 16:56:23 (GMT) |
commit | 29f9db5c63dbfa53acdb449fad78d716a4113a88 (patch) | |
tree | 6b6ba4b75a7e906a455024292fe9f5f25299c8a1 /Tests/RunCMake/try_compile/RunCMakeTest.cmake | |
parent | 78c2edb129594b198157799b3eb327f4a3915908 (diff) | |
download | CMake-29f9db5c63dbfa53acdb449fad78d716a4113a88.zip CMake-29f9db5c63dbfa53acdb449fad78d716a4113a88.tar.gz CMake-29f9db5c63dbfa53acdb449fad78d716a4113a88.tar.bz2 |
try_compile/try_run: Add support for LINK_OPTIONS option.
Diffstat (limited to 'Tests/RunCMake/try_compile/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/try_compile/RunCMakeTest.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake index 6a1bc64..77fb7a0 100644 --- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake @@ -25,6 +25,13 @@ run_cmake(TargetTypeExe) run_cmake(TargetTypeInvalid) run_cmake(TargetTypeStatic) +if (CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows)$" AND + CMAKE_C_COMPILER_ID MATCHES "^(MSVC|GNU|Clang|AppleClang)$") + set (RunCMake_TEST_OPTIONS -DRunCMake_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}) + run_cmake(LinkOptions) + unset (RunCMake_TEST_OPTIONS) +endif() + if(CMAKE_C_STANDARD_DEFAULT) run_cmake(CStandard) elseif(DEFINED CMAKE_C_STANDARD_DEFAULT) |