summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMakeLists.txt9
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake2
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckCUDACompilerFlag.cmake2
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake2
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake2
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckOBJCCompilerFlag.cmake2
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckOBJCXXCompilerFlag.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckCSourceCompiles.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckCUDASourceCompiles.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckCXXSourceCompiles.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckOBJCSourceCompiles.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckCSourceRuns.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckCUDASourceRuns.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckCXXSourceRuns.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckFortranSourceRuns.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake2
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake2
19 files changed, 42 insertions, 3 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 7000b79468..615bf20cda 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -539,10 +539,13 @@ add_RunCMake_test(target_compile_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILE
add_RunCMake_test(target_include_directories)
add_RunCMake_test(target_sources)
add_RunCMake_test(CheckCompilerFlag -DCMake_TEST_CUDA=${CMake_TEST_CUDA}
- -DCMake_TEST_ISPC=${CMake_TEST_ISPC})
+ -DCMake_TEST_ISPC=${CMake_TEST_ISPC}
+ -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID})
add_RunCMake_test(CheckSourceCompiles -DCMake_TEST_CUDA=${CMake_TEST_CUDA}
- -DCMake_TEST_ISPC=${CMake_TEST_ISPC})
-add_RunCMake_test(CheckSourceRuns -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
+ -DCMake_TEST_ISPC=${CMake_TEST_ISPC}
+ -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID})
+add_RunCMake_test(CheckSourceRuns -DCMake_TEST_CUDA=${CMake_TEST_CUDA}
+ -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID})
set_property(TEST RunCMake.CheckCompilerFlag
RunCMake.CheckSourceCompiles
RunCMake.CheckSourceRuns
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake
index 095fd54456..6483f1123c 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake
@@ -2,6 +2,8 @@
enable_language (C)
include(CheckCompilerFlag)
+set(C 1) # test that this is tolerated
+
check_compiler_flag(C "-_this_is_not_a_flag_" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "invalid C compile flag didn't fail.")
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckCUDACompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckCUDACompilerFlag.cmake
index a40699cad9..681a5466c2 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckCUDACompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckCUDACompilerFlag.cmake
@@ -2,6 +2,8 @@
enable_language (CUDA)
include(CheckCompilerFlag)
+set(CUDA 1) # test that this is tolerated
+
check_compiler_flag(CUDA "-_this_is_not_a_flag_" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "invalid CUDA compile flag didn't fail.")
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake
index bbc104e91e..60e9755b35 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake
@@ -2,6 +2,8 @@
enable_language (CXX)
include(CheckCompilerFlag)
+set(CXX 1) # test that this is tolerated
+
check_compiler_flag(CXX "-_this_is_not_a_flag_" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "invalid CXX compile flag didn't fail.")
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake
index 220ee29350..7bb88b19d6 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake
@@ -1,6 +1,8 @@
enable_language (Fortran)
include(CheckCompilerFlag)
+set(Fortran 1) # test that this is tolerated
+
check_compiler_flag(Fortran "-_this_is_not_a_flag_" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "invalid Fortran compile flag didn't fail.")
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckOBJCCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckOBJCCompilerFlag.cmake
index e9344ca116..f250f8d49d 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckOBJCCompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckOBJCCompilerFlag.cmake
@@ -1,6 +1,8 @@
enable_language (OBJC)
include(CheckCompilerFlag)
+set(OBJC 1) # test that this is tolerated
+
check_compiler_flag(OBJC "-_this_is_not_a_flag_" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "invalid OBJC compile flag didn't fail.")
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckOBJCXXCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckOBJCXXCompilerFlag.cmake
index 503a1de0f1..bc940a6298 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckOBJCXXCompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckOBJCXXCompilerFlag.cmake
@@ -1,6 +1,8 @@
enable_language (OBJCXX)
include(CheckCompilerFlag)
+set(OBJCXX 1) # test that this is tolerated
+
check_compiler_flag(OBJCXX "-_this_is_not_a_flag_" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "invalid OBJCXX compile flag didn't fail.")
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckCSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckCSourceCompiles.cmake
index cf461893cd..4f7362254f 100644
--- a/Tests/RunCMake/CheckSourceCompiles/CheckCSourceCompiles.cmake
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckCSourceCompiles.cmake
@@ -2,6 +2,8 @@
enable_language (C)
include(CheckSourceCompiles)
+set(C 1) # test that this is tolerated
+
check_source_compiles(C "I don't build" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "invalid C source didn't fail.")
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckCUDASourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckCUDASourceCompiles.cmake
index 1e6e6b266b..21906499eb 100644
--- a/Tests/RunCMake/CheckSourceCompiles/CheckCUDASourceCompiles.cmake
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckCUDASourceCompiles.cmake
@@ -2,6 +2,8 @@
enable_language (CUDA)
include(CheckSourceCompiles)
+set(CUDA 1) # test that this is tolerated
+
check_source_compiles(CUDA "I don't build" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "invalid CUDA source didn't fail.")
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckCXXSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckCXXSourceCompiles.cmake
index ec01d42f71..97c9c30f5d 100644
--- a/Tests/RunCMake/CheckSourceCompiles/CheckCXXSourceCompiles.cmake
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckCXXSourceCompiles.cmake
@@ -2,6 +2,8 @@
enable_language (CXX)
include(CheckSourceCompiles)
+set(CXX 1) # test that this is tolerated
+
check_source_compiles(CXX "I don't build" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "invalid CXX source didn't fail.")
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake
index 1d4e16d45d..48dc5255d0 100644
--- a/Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake
@@ -3,6 +3,8 @@
enable_language (Fortran)
include(CheckSourceCompiles)
+set(Fortran 1) # test that this is tolerated
+
check_source_compiles(Fortran [=[
PROGRAM TEST_HAVE_PRINT
PRINT *, 'Hello'
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckOBJCSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckOBJCSourceCompiles.cmake
index 2f53cfc4f6..76a5009565 100644
--- a/Tests/RunCMake/CheckSourceCompiles/CheckOBJCSourceCompiles.cmake
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckOBJCSourceCompiles.cmake
@@ -1,6 +1,8 @@
enable_language (OBJC)
include(CheckSourceCompiles)
+set(OBJC 1) # test that this is tolerated
+
check_source_compiles(OBJC [[
#import <Foundation/Foundation.h>
int main() {
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake
index 805d5136cb..814237ecca 100644
--- a/Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake
+++ b/Tests/RunCMake/CheckSourceCompiles/CheckOBJCXXSourceCompiles.cmake
@@ -1,6 +1,8 @@
enable_language (OBJCXX)
include(CheckSourceCompiles)
+set(OBJCXX 1) # test that this is tolerated
+
check_source_compiles(OBJCXX [[
#include <vector>
#import <Foundation/Foundation.h>
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckCSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckCSourceRuns.cmake
index 3029ac26b3..96a10274cb 100644
--- a/Tests/RunCMake/CheckSourceRuns/CheckCSourceRuns.cmake
+++ b/Tests/RunCMake/CheckSourceRuns/CheckCSourceRuns.cmake
@@ -2,6 +2,8 @@
enable_language (C)
include(CheckSourceRuns)
+set(C 1) # test that this is tolerated
+
check_source_runs(C "int main() {return 2;}" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "C check_source_runs succeeded, but should have failed.")
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckCUDASourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckCUDASourceRuns.cmake
index 01e5ac83c8..ea5f4f9754 100644
--- a/Tests/RunCMake/CheckSourceRuns/CheckCUDASourceRuns.cmake
+++ b/Tests/RunCMake/CheckSourceRuns/CheckCUDASourceRuns.cmake
@@ -2,6 +2,8 @@
enable_language (CUDA)
include(CheckSourceRuns)
+set(CUDA 1) # test that this is tolerated
+
check_source_runs(CUDA "int main() {return 2;}" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "CUDA check_source_runs succeeded, but should have failed.")
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckCXXSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckCXXSourceRuns.cmake
index d47ddda337..c4bef6e949 100644
--- a/Tests/RunCMake/CheckSourceRuns/CheckCXXSourceRuns.cmake
+++ b/Tests/RunCMake/CheckSourceRuns/CheckCXXSourceRuns.cmake
@@ -2,6 +2,8 @@
enable_language (CXX)
include(CheckSourceRuns)
+set(CXX 1) # test that this is tolerated
+
check_source_runs(CXX "int main() {return 2;}" SHOULD_FAIL)
if(SHOULD_FAIL)
message(SEND_ERROR "CXX check_source_runs succeeded, but should have failed.")
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckFortranSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckFortranSourceRuns.cmake
index 2a1fdfe196..50e8ec85f9 100644
--- a/Tests/RunCMake/CheckSourceRuns/CheckFortranSourceRuns.cmake
+++ b/Tests/RunCMake/CheckSourceRuns/CheckFortranSourceRuns.cmake
@@ -3,6 +3,8 @@
enable_language (Fortran)
include(CheckSourceRuns)
+set(Fortran 1) # test that this is tolerated
+
check_source_runs(Fortran [=[
PROGRAM TEST_HAVE_PRINT
PRINT *, 'Hello'
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake
index 55f28f3a78..b8283523d7 100644
--- a/Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake
+++ b/Tests/RunCMake/CheckSourceRuns/CheckOBJCSourceRuns.cmake
@@ -1,6 +1,8 @@
enable_language (OBJC)
include(CheckSourceRuns)
+set(OBJC 1) # test that this is tolerated
+
check_source_runs(OBJC [[
#import <Foundation/Foundation.h>
int main() {
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake
index a218acdd74..8a56f139b8 100644
--- a/Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake
+++ b/Tests/RunCMake/CheckSourceRuns/CheckOBJCXXSourceRuns.cmake
@@ -1,6 +1,8 @@
enable_language (OBJCXX)
include(CheckSourceRuns)
+set(OBJCXX 1) # test that this is tolerated
+
check_source_runs(OBJCXX [[
#include <vector>
#import <Foundation/Foundation.h>