summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CTestUpdateGIT.cmake.in2
-rw-r--r--Tests/RunCMake/ParseImplicitData/hand-C-relative.input4
-rw-r--r--Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input4
-rw-r--r--Tests/RunCMake/try_run/CrossCompile.cmake8
-rw-r--r--Tests/RunCMake/try_run/old_and_new_signature_tests.cmake2
-rw-r--r--Tests/VSMASM/CMakeLists.txt2
6 files changed, 16 insertions, 6 deletions
diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in
index a3ef4ebdb..7fddaa303 100644
--- a/Tests/CTestUpdateGIT.cmake.in
+++ b/Tests/CTestUpdateGIT.cmake.in
@@ -34,7 +34,7 @@ endif()
# Adapt to the system default branch name.
execute_process(
- COMMAND ${GIT} config --get init.defaultBranch
+ COMMAND ${GIT} --git-dir= config --get init.defaultBranch
RESULT_VARIABLE defaultBranchFailed
OUTPUT_VARIABLE defaultBranch
ERROR_VARIABLE defaultBranchError
diff --git a/Tests/RunCMake/ParseImplicitData/hand-C-relative.input b/Tests/RunCMake/ParseImplicitData/hand-C-relative.input
index 52ac9df09..dd0c10b35 100644
--- a/Tests/RunCMake/ParseImplicitData/hand-C-relative.input
+++ b/Tests/RunCMake/ParseImplicitData/hand-C-relative.input
@@ -16,8 +16,8 @@ This is a hand-written test case.
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
- ../../../adaptive/relative/include
+ ../../../../adaptive/relative/include
/usr/include
End of search list.
-/usr/bin/ld -L/usr/lib64 -L../../../adaptive/relative/lib
+/usr/bin/ld -L/usr/lib64 -L../../../../adaptive/relative/lib
diff --git a/Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input b/Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input
index 0b223a130..568933ad2 100644
--- a/Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input
+++ b/Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input
@@ -16,8 +16,8 @@ This is a hand-written test case.
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
- ../../../adaptive/relative/include
+ ../../../../adaptive/relative/include
/usr/include
End of search list.
-/usr/bin/ld -L/usr/lib64 -L../../../adaptive/relative/lib
+/usr/bin/ld -L/usr/lib64 -L../../../../adaptive/relative/lib
diff --git a/Tests/RunCMake/try_run/CrossCompile.cmake b/Tests/RunCMake/try_run/CrossCompile.cmake
new file mode 100644
index 000000000..4993768b7
--- /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 e1c1784b7..2b51eb24b 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)
diff --git a/Tests/VSMASM/CMakeLists.txt b/Tests/VSMASM/CMakeLists.txt
index 2923e1527..603a43bc8 100644
--- a/Tests/VSMASM/CMakeLists.txt
+++ b/Tests/VSMASM/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.25) # Enable CMP0141
project(VSMASM C ASM_MASM)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-DTESTx64)