summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-09-14 17:26:43 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2020-09-23 16:28:37 (GMT)
commit357e2ef429b5245de4f2f5fc7ba7b8089d90bb1c (patch)
tree77b39aa9c625e80699a3998be433cde4f5dc9d88 /Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
parent10ae907de07c26820a765c6a516d1f4baa46161d (diff)
downloadCMake-357e2ef429b5245de4f2f5fc7ba7b8089d90bb1c.zip
CMake-357e2ef429b5245de4f2f5fc7ba7b8089d90bb1c.tar.gz
CMake-357e2ef429b5245de4f2f5fc7ba7b8089d90bb1c.tar.bz2
CheckSoureRuns: Add a unified way to check if a source runs
Diffstat (limited to 'Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake b/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
new file mode 100644
index 0000000..8bcde6a
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
@@ -0,0 +1,16 @@
+include(RunCMake)
+
+run_cmake(NotEnabledLanguage)
+run_cmake(NonExistentLanguage)
+
+run_cmake(CheckCSourceRuns)
+run_cmake(CheckCXXSourceRuns)
+
+if (APPLE)
+ run_cmake(CheckOBJCSourceRuns)
+ run_cmake(CheckOBJCXXSourceRuns)
+endif()
+
+if (CMAKE_Fortran_COMPILER_ID)
+ run_cmake(CheckFortranSourceRuns)
+endif()