summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CheckSourceRuns
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CheckSourceRuns')
-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
6 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckCSourceRuns.cmake b/Tests/RunCMake/CheckSourceRuns/CheckCSourceRuns.cmake
index 3029ac2..96a1027 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 01e5ac8..ea5f4f9 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 d47ddda..c4bef6e 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 2a1fdfe..50e8ec8 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 55f28f3..b828352 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 a218acd..8a56f13 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>