summaryrefslogtreecommitdiffstats
path: root/Source/CMakeLists.txt
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-08-26 19:50:39 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-08-26 19:50:39 (GMT)
commite803b32b89761c8fa5c0f944e651b456aad9a77f (patch)
tree5d112b95cf5a0ff5401164d0a7891838b1250486 /Source/CMakeLists.txt
parent66a08c10e5bd4b8eff58837cd58372a4dfdd19df (diff)
downloadCMake-e803b32b89761c8fa5c0f944e651b456aad9a77f.zip
CMake-e803b32b89761c8fa5c0f944e651b456aad9a77f.tar.gz
CMake-e803b32b89761c8fa5c0f944e651b456aad9a77f.tar.bz2
Add a fortran test if there is a fortran compiler
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r--Source/CMakeLists.txt17
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 1a1fea0..8dd53e1 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -616,8 +616,21 @@ IF(BUILD_TESTING)
)
ENDIF (CTEST_TEST_CTEST)
-
-
+ # see if we can find a fortran compiler on the machine
+ # if so, add the fortran test and see if it works.
+ INCLUDE(CMakeDetermineFortranCompiler)
+ IF(CMAKE_Fortran_COMPILER_FULLPATH)
+ ADD_TEST(Fortran ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/Fortran"
+ "${CMake_BINARY_DIR}/Tests/Fortran"
+ --build-generator ${CMAKE_GENERATOR}
+ --build-project Simple
+ --build-makeprogram ${MAKEPROGRAM}
+ --build-two-config
+ --test-command testf)
+ ENDIF(CMAKE_Fortran_COMPILER_FULLPATH)
+
IF (CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE OR WXWINDOWS_INCLUDE_DIR)
# Will be set if the wxwindows gui is on
ADD_TEST(UseWX ${CMAKE_CTEST_COMMAND}