summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-08-24 18:25:40 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-08-24 18:25:40 (GMT)
commit34a0284603e3f4c746140d4c94eab98f9e513a8d (patch)
tree0b639aceb49d130bf3077a2e69820273bb9928f8 /Tests
parentdb78df744f71cada436c21499cc22a86554a6de4 (diff)
parent403ead65947751697dc17021b639caa12c6ac74a (diff)
downloadCMake-34a0284603e3f4c746140d4c94eab98f9e513a8d.zip
CMake-34a0284603e3f4c746140d4c94eab98f9e513a8d.tar.gz
CMake-34a0284603e3f4c746140d4c94eab98f9e513a8d.tar.bz2
Merge topic 'ide-compiler-id'
403ead6 Document CMAKE_<LANG>_COMPILER_(ID|VERSION) values 8be51f6 Test variables CMAKE_(C|CXX|Fortran)_COMPILER(|_ID|_VERSION) ec22a9b Cleanly enable a language in multiple subdirectories 66cb335 VS: Detect the compiler id and tool location 89595d6 VS10: Define CMAKE_VS_PLATFORM_TOOLSET variable 965a69d Xcode: Detect the compiler id and tool location 9a9e1ee CMakeDetermineCompilerId: Prepare to detect IDE compiler id b8b5c83 Re-order C/C++/Fortran compiler determination logic
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeOnly/CMakeLists.txt6
-rw-r--r--Tests/CMakeOnly/CompilerIdC/CMakeLists.txt14
-rw-r--r--Tests/CMakeOnly/CompilerIdCXX/CMakeLists.txt14
-rw-r--r--Tests/CMakeOnly/CompilerIdFortran/CMakeLists.txt22
4 files changed, 56 insertions, 0 deletions
diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt
index 6fe91c7..ba681d8 100644
--- a/Tests/CMakeOnly/CMakeLists.txt
+++ b/Tests/CMakeOnly/CMakeLists.txt
@@ -19,6 +19,12 @@ add_CMakeOnly_test(CheckCXXCompilerFlag)
add_CMakeOnly_test(CheckLanguage)
+add_CMakeOnly_test(CompilerIdC)
+add_CMakeOnly_test(CompilerIdCXX)
+if(CMAKE_Fortran_COMPILER)
+ add_CMakeOnly_test(CompilerIdFortran)
+endif()
+
add_CMakeOnly_test(AllFindModules)
add_CMakeOnly_test(TargetScope)
diff --git a/Tests/CMakeOnly/CompilerIdC/CMakeLists.txt b/Tests/CMakeOnly/CompilerIdC/CMakeLists.txt
new file mode 100644
index 0000000..848ffdd
--- /dev/null
+++ b/Tests/CMakeOnly/CompilerIdC/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 2.8.9)
+project(CompilerIdC C)
+
+foreach(v
+ CMAKE_C_COMPILER
+ CMAKE_C_COMPILER_ID
+ CMAKE_C_COMPILER_VERSION
+ )
+ if(${v})
+ message(STATUS "${v}=[${${v}}]")
+ else()
+ message(SEND_ERROR "${v} not set!")
+ endif()
+endforeach()
diff --git a/Tests/CMakeOnly/CompilerIdCXX/CMakeLists.txt b/Tests/CMakeOnly/CompilerIdCXX/CMakeLists.txt
new file mode 100644
index 0000000..94ac31e
--- /dev/null
+++ b/Tests/CMakeOnly/CompilerIdCXX/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 2.8.9)
+project(CompilerIdCXX CXX)
+
+foreach(v
+ CMAKE_CXX_COMPILER
+ CMAKE_CXX_COMPILER_ID
+ CMAKE_CXX_COMPILER_VERSION
+ )
+ if(${v})
+ message(STATUS "${v}=[${${v}}]")
+ else()
+ message(SEND_ERROR "${v} not set!")
+ endif()
+endforeach()
diff --git a/Tests/CMakeOnly/CompilerIdFortran/CMakeLists.txt b/Tests/CMakeOnly/CompilerIdFortran/CMakeLists.txt
new file mode 100644
index 0000000..3a2bdeb
--- /dev/null
+++ b/Tests/CMakeOnly/CompilerIdFortran/CMakeLists.txt
@@ -0,0 +1,22 @@
+cmake_minimum_required(VERSION 2.8.9)
+project(CompilerIdFortran Fortran)
+
+foreach(v
+ CMAKE_Fortran_COMPILER
+ CMAKE_Fortran_COMPILER_ID
+ )
+ if(${v})
+ message(STATUS "${v}=[${${v}}]")
+ else()
+ message(SEND_ERROR "${v} not set!")
+ endif()
+endforeach()
+foreach(v
+ CMAKE_Fortran_COMPILER_VERSION
+ )
+ if(${v})
+ message(STATUS "${v}=[${${v}}]")
+ else()
+ message(WARNING "${v} not set!")
+ endif()
+endforeach()