diff options
author | Brad King <brad.king@kitware.com> | 2023-01-12 18:55:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-01-12 18:55:57 (GMT) |
commit | 5cd5c8cac5460f37dbdc27ad48cabc3282f2f5f8 (patch) | |
tree | 03097321152d1b2b60eb80c0c8c12c1471fbb614 /Tests | |
parent | 0191e8b512d4a2d2bdb9f65ea9edebced9dee372 (diff) | |
parent | 2f85ec0a37d1ad75956dd81016a8c7ab90ff845b (diff) | |
download | CMake-5cd5c8cac5460f37dbdc27ad48cabc3282f2f5f8.zip CMake-5cd5c8cac5460f37dbdc27ad48cabc3282f2f5f8.tar.gz CMake-5cd5c8cac5460f37dbdc27ad48cabc3282f2f5f8.tar.bz2 |
Merge branch 'backport-try_run-cross-compile' into try_run-cross-compile
Diffstat (limited to 'Tests')
-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) |