summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-09-22 14:06:16 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-09-22 14:06:16 (GMT)
commit597185754420db18d83b2c9e3b9f1e33675bd935 (patch)
tree0890dba1ea0742922eac50cf2b92da6eeba9c94b
parent4cf0f5b5caf82a384eee37262db504122c9bfab9 (diff)
downloadCMake-597185754420db18d83b2c9e3b9f1e33675bd935.zip
CMake-597185754420db18d83b2c9e3b9f1e33675bd935.tar.gz
CMake-597185754420db18d83b2c9e3b9f1e33675bd935.tar.bz2
ENH: only try to use fortran if the generator is make based
-rw-r--r--Source/CMakeLists.txt37
1 files changed, 20 insertions, 17 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index f615db2..56f2abb 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -636,23 +636,26 @@ 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.
- SET(CMAKE_Fortran_COMPILER_LIST ifort ifc efc f95 pgf95
- lf95 xlf95 fort gfortran f90 pgf90 xlf90 epcf90 f77 fort77 frt pgf77 xlf fl32 af77 g77 )
- FIND_PROGRAM(CMAKE_Fortran_COMPILER_FULLPATH NAMES ${CMAKE_Fortran_COMPILER_LIST} )
- MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER_FULLPATH)
- 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_GENERATOR MATCHES "Makefiles")
+ # see if we can find a fortran compiler on the machine
+ # if so, add the fortran test and see if it works.
+ SET(CMAKE_Fortran_COMPILER_LIST ifort ifc efc f95 pgf95
+ lf95 xlf95 fort gfortran f90 pgf90 xlf90 epcf90 f77
+ fort77 frt pgf77 xlf fl32 af77 g77 )
+ FIND_PROGRAM(CMAKE_Fortran_COMPILER_FULLPATH NAMES ${CMAKE_Fortran_COMPILER_LIST} )
+ MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER_FULLPATH)
+ 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)
+ ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
IF (CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE OR WXWINDOWS_INCLUDE_DIR)
# Will be set if the wxwindows gui is on