summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/ABI/C.cmake4
-rw-r--r--Tests/RunCMake/ABI/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/ABI/CUDA.cmake4
-rw-r--r--Tests/RunCMake/ABI/CXX.cmake4
-rw-r--r--Tests/RunCMake/ABI/OBJC.cmake4
-rw-r--r--Tests/RunCMake/ABI/OBJCXX.cmake4
-rw-r--r--Tests/RunCMake/ABI/RunCMakeTest.cmake13
-rw-r--r--Tests/RunCMake/CMakeLists.txt4
8 files changed, 40 insertions, 0 deletions
diff --git a/Tests/RunCMake/ABI/C.cmake b/Tests/RunCMake/ABI/C.cmake
new file mode 100644
index 0000000..51f5a34
--- /dev/null
+++ b/Tests/RunCMake/ABI/C.cmake
@@ -0,0 +1,4 @@
+enable_language(C)
+if(NOT CMAKE_C_BYTE_ORDER MATCHES "^(BIG_ENDIAN|LITTLE_ENDIAN)$" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES ";ppc|ppc;")
+ message(FATAL_ERROR "CMAKE_C_BYTE_ORDER has unexpected value '${CMAKE_C_BYTE_ORDER}'")
+endif()
diff --git a/Tests/RunCMake/ABI/CMakeLists.txt b/Tests/RunCMake/ABI/CMakeLists.txt
new file mode 100644
index 0000000..ab1a20c
--- /dev/null
+++ b/Tests/RunCMake/ABI/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.19)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ABI/CUDA.cmake b/Tests/RunCMake/ABI/CUDA.cmake
new file mode 100644
index 0000000..1a40843
--- /dev/null
+++ b/Tests/RunCMake/ABI/CUDA.cmake
@@ -0,0 +1,4 @@
+enable_language(CUDA)
+if(NOT CMAKE_CUDA_BYTE_ORDER MATCHES "^(BIG_ENDIAN|LITTLE_ENDIAN)$" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES ";ppc|ppc;")
+ message(FATAL_ERROR "CMAKE_CUDA_BYTE_ORDER has unexpected value '${CMAKE_CUDA_BYTE_ORDER}'")
+endif()
diff --git a/Tests/RunCMake/ABI/CXX.cmake b/Tests/RunCMake/ABI/CXX.cmake
new file mode 100644
index 0000000..7dc6f4a
--- /dev/null
+++ b/Tests/RunCMake/ABI/CXX.cmake
@@ -0,0 +1,4 @@
+enable_language(CXX)
+if(NOT CMAKE_CXX_BYTE_ORDER MATCHES "^(BIG_ENDIAN|LITTLE_ENDIAN)$" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES ";ppc|ppc;")
+ message(FATAL_ERROR "CMAKE_CXX_BYTE_ORDER has unexpected value '${CMAKE_CXX_BYTE_ORDER}'")
+endif()
diff --git a/Tests/RunCMake/ABI/OBJC.cmake b/Tests/RunCMake/ABI/OBJC.cmake
new file mode 100644
index 0000000..9caccee
--- /dev/null
+++ b/Tests/RunCMake/ABI/OBJC.cmake
@@ -0,0 +1,4 @@
+enable_language(OBJC)
+if(NOT CMAKE_OBJC_BYTE_ORDER MATCHES "^(BIG_ENDIAN|LITTLE_ENDIAN)$" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES ";ppc|ppc;")
+ message(FATAL_ERROR "CMAKE_OBJC_BYTE_ORDER has unexpected value '${CMAKE_OBJC_BYTE_ORDER}'")
+endif()
diff --git a/Tests/RunCMake/ABI/OBJCXX.cmake b/Tests/RunCMake/ABI/OBJCXX.cmake
new file mode 100644
index 0000000..8ddefc0
--- /dev/null
+++ b/Tests/RunCMake/ABI/OBJCXX.cmake
@@ -0,0 +1,4 @@
+enable_language(OBJCXX)
+if(NOT CMAKE_OBJCXX_BYTE_ORDER MATCHES "^(BIG_ENDIAN|LITTLE_ENDIAN)$" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES ";ppc|ppc;")
+ message(FATAL_ERROR "CMAKE_OBJCXX_BYTE_ORDER has unexpected value '${CMAKE_OBJCXX_BYTE_ORDER}'")
+endif()
diff --git a/Tests/RunCMake/ABI/RunCMakeTest.cmake b/Tests/RunCMake/ABI/RunCMakeTest.cmake
new file mode 100644
index 0000000..883b849
--- /dev/null
+++ b/Tests/RunCMake/ABI/RunCMakeTest.cmake
@@ -0,0 +1,13 @@
+include(RunCMake)
+
+run_cmake(C)
+run_cmake(CXX)
+
+if(APPLE)
+ run_cmake(OBJC)
+ run_cmake(OBJCXX)
+endif()
+
+if(CMake_TEST_CUDA)
+ run_cmake(CUDA)
+endif()
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 9fc5b69..740815b 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -179,6 +179,10 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
)
endif()
+add_RunCMake_test(ABI -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
+set_property(TEST RunCMake.ABI APPEND
+ PROPERTY LABELS "CUDA")
+
add_RunCMake_test(AndroidTestUtilities)
set(autogen_with_qt5 FALSE)
if(CMake_TEST_Qt5)