diff options
author | Brad King <brad.king@kitware.com> | 2023-01-13 13:47:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-01-13 13:47:20 (GMT) |
commit | 043ed0ce4171ad4fd80ed5d7a9f57fb6b67b695e (patch) | |
tree | ae4991de8f21b36413080ae18c2fd23771374cd7 /Tests/RunCMake | |
parent | 73c867895d2f168f89ebcd1d03977fac4d988dbd (diff) | |
parent | 5cd5c8cac5460f37dbdc27ad48cabc3282f2f5f8 (diff) | |
download | CMake-043ed0ce4171ad4fd80ed5d7a9f57fb6b67b695e.zip CMake-043ed0ce4171ad4fd80ed5d7a9f57fb6b67b695e.tar.gz CMake-043ed0ce4171ad4fd80ed5d7a9f57fb6b67b695e.tar.bz2 |
Merge topic 'try_run-cross-compile'
5cd5c8cac5 Merge branch 'backport-try_run-cross-compile' into try_run-cross-compile
0191e8b512 try_run: Do not require unrequested stdout/stderr when cross-compiling
2f85ec0a37 try_run: Avoid crash in keyword-dispatched signature when cross-compiling
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8066
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/try_run/CrossCompile.cmake | 8 | ||||
-rw-r--r-- | Tests/RunCMake/try_run/old_and_new_signature_tests.cmake | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/try_run/CrossCompile.cmake b/Tests/RunCMake/try_run/CrossCompile.cmake new file mode 100644 index 0000000..4993768 --- /dev/null +++ b/Tests/RunCMake/try_run/CrossCompile.cmake @@ -0,0 +1,8 @@ +include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS}) + +# Pretend we are cross-compiling to take that try_run code path. +set(CMAKE_CROSSCOMPILING 1) +set(RUN_RESULT 0) +try_run(RUN_RESULT COMPILE_RESULT ${try_compile_bindir_or_SOURCES} + ${CMAKE_CURRENT_SOURCE_DIR}/src.c) +unset(CMAKE_CROSSCOMPILING) diff --git a/Tests/RunCMake/try_run/old_and_new_signature_tests.cmake b/Tests/RunCMake/try_run/old_and_new_signature_tests.cmake index e1c1784..2b51eb2 100644 --- a/Tests/RunCMake/try_run/old_and_new_signature_tests.cmake +++ b/Tests/RunCMake/try_run/old_and_new_signature_tests.cmake @@ -11,6 +11,8 @@ run_cmake(BadLinkLibraries) run_cmake(BinDirEmpty) run_cmake(BinDirRelative) +run_cmake(CrossCompile) + run_cmake(WorkingDirArg) run_cmake(NoCompileOutputVariable) |