diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-08-06 18:51:41 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-08-06 18:51:41 (GMT) |
commit | 9655299f08b5aa04ea63193ebecfa08efae7ca3d (patch) | |
tree | 69f0415d9b8414cee074b25d80c4520a6feb6086 /Modules/CMakeSystemSpecificInformation.cmake | |
parent | 0220a85e3337f87c3b34c2d49d85b6ace127ea50 (diff) | |
download | CMake-9655299f08b5aa04ea63193ebecfa08efae7ca3d.zip CMake-9655299f08b5aa04ea63193ebecfa08efae7ca3d.tar.gz CMake-9655299f08b5aa04ea63193ebecfa08efae7ca3d.tar.bz2 |
ENH: initial fortran support
Diffstat (limited to 'Modules/CMakeSystemSpecificInformation.cmake')
-rw-r--r-- | Modules/CMakeSystemSpecificInformation.cmake | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake index c9f5c29..0abf65d 100644 --- a/Modules/CMakeSystemSpecificInformation.cmake +++ b/Modules/CMakeSystemSpecificInformation.cmake @@ -135,6 +135,50 @@ IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP) SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP}) ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP) +# Create a set of shared library variable specific to Fortran +# For 90% of the systems, these are the same flags as the C versions +# so if these are not set just copy the flags from the c version +IF(NOT CMAKE_SHARED_LIBRARY_CREATE_FORTRAN_FLAGS) + SET(CMAKE_SHARED_LIBRARY_CREATE_FORTRAN_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_FORTRAN_FLAGS) + +IF(NOT CMAKE_SHARED_LIBRARY_FORTRAN_FLAGS) + SET(CMAKE_SHARED_LIBRARY_FORTRAN_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_FORTRAN_FLAGS) + +IF(NOT CMAKE_SHARED_LIBRARY_LINK_FORTRAN_FLAGS) + SET(CMAKE_SHARED_LIBRARY_LINK_FORTRAN_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_FLAGS}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_FORTRAN_FLAGS) + +IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG) + +IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG_SEP) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_FORTRAN_FLAG_SEP) + +# repeat for modules +IF(NOT CMAKE_SHARED_MODULE_CREATE_FORTRAN_FLAGS) + SET(CMAKE_SHARED_MODULE_CREATE_FORTRAN_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_FORTRAN_FLAGS) + +IF(NOT CMAKE_SHARED_MODULE_FORTRAN_FLAGS) + SET(CMAKE_SHARED_MODULE_FORTRAN_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_MODULE_FORTRAN_FLAGS) + +IF(NOT CMAKE_SHARED_MODULE_LINK_FORTRAN_FLAGS) + SET(CMAKE_SHARED_MODULE_LINK_FORTRAN_FLAGS ${CMAKE_SHARED_MODULE_LINK_FLAGS}) +ENDIF(NOT CMAKE_SHARED_MODULE_LINK_FORTRAN_FLAGS) + +IF(NOT CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG) + SET(CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_FLAG}) +ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG) + +IF(NOT CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG_SEP) + SET(CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP}) +ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_FORTRAN_FLAG_SEP) + # include default rules that work for most unix like systems and compilers # this file will not set anything if it is already set INCLUDE(${CMAKE_ROOT}/Modules/CMakeDefaultMakeRuleVariables.cmake) @@ -158,6 +202,9 @@ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_ENV_INIT} $ENV{CXXFLAGS} ${CMAKE_CXX_FLA SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_ENV_INIT} $ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}" CACHE STRING "Flags for C compiler.") +SET (CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS_ENV_INIT} $ENV{FFLAGS} ${CMAKE_FORTRAN_FLAGS_INIT}" CACHE STRING + "Flags for Fortran compiler.") + SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS} CACHE STRING "Flags used by the linker.") |