Add a fortran test if there is a fortran compiler
This commit is contained in:
parent
66a08c10e5
commit
e803b32b89
@ -4,7 +4,6 @@
|
|||||||
# use environment variable CCC first if defined by user, next use
|
# use environment variable CCC first if defined by user, next use
|
||||||
# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator
|
# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator
|
||||||
# as a default compiler
|
# as a default compiler
|
||||||
|
|
||||||
IF(NOT CMAKE_Fortran_COMPILER)
|
IF(NOT CMAKE_Fortran_COMPILER)
|
||||||
# prefer the environment variable CC
|
# prefer the environment variable CC
|
||||||
IF($ENV{FC} MATCHES ".+")
|
IF($ENV{FC} MATCHES ".+")
|
||||||
@ -42,8 +41,8 @@ IF(NOT CMAKE_Fortran_COMPILER)
|
|||||||
# efc: Intel Fortran 95 compiler for IA64
|
# efc: Intel Fortran 95 compiler for IA64
|
||||||
# the order is 95 or newer compilers first, then 90, then 77 or older compilers, gnu is always last in the group,
|
# the order is 95 or newer compilers first, then 90, then 77 or older compilers, gnu is always last in the group,
|
||||||
# so if you paid for a compiler it is picked by default
|
# so if you paid for a compiler it is picked by default
|
||||||
SET(CMAKE_Fortran_COMPILER_LIST ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran f90 pgf90 xlf90 epcf90
|
SET(CMAKE_Fortran_COMPILER_LIST ifort ifc efc f95 pgf95
|
||||||
f77 fort77 frt pgf77 xlf fl32 af77 g77 )
|
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} )
|
FIND_PROGRAM(CMAKE_Fortran_COMPILER_FULLPATH NAMES ${CMAKE_Fortran_COMPILER_LIST} )
|
||||||
GET_FILENAME_COMPONENT(CMAKE_Fortran_COMPILER_INIT
|
GET_FILENAME_COMPONENT(CMAKE_Fortran_COMPILER_INIT
|
||||||
${CMAKE_Fortran_COMPILER_FULLPATH} NAME)
|
${CMAKE_Fortran_COMPILER_FULLPATH} NAME)
|
||||||
|
@ -616,7 +616,20 @@ IF(BUILD_TESTING)
|
|||||||
)
|
)
|
||||||
|
|
||||||
ENDIF (CTEST_TEST_CTEST)
|
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)
|
IF (CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE OR WXWINDOWS_INCLUDE_DIR)
|
||||||
# Will be set if the wxwindows gui is on
|
# Will be set if the wxwindows gui is on
|
||||||
|
Loading…
x
Reference in New Issue
Block a user