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/CMakeDefaultMakeRuleVariables.cmake | |
parent | 0220a85e3337f87c3b34c2d49d85b6ace127ea50 (diff) | |
download | CMake-9655299f08b5aa04ea63193ebecfa08efae7ca3d.zip CMake-9655299f08b5aa04ea63193ebecfa08efae7ca3d.tar.gz CMake-9655299f08b5aa04ea63193ebecfa08efae7ca3d.tar.bz2 |
ENH: initial fortran support
Diffstat (limited to 'Modules/CMakeDefaultMakeRuleVariables.cmake')
-rw-r--r-- | Modules/CMakeDefaultMakeRuleVariables.cmake | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Modules/CMakeDefaultMakeRuleVariables.cmake b/Modules/CMakeDefaultMakeRuleVariables.cmake index a1a0aad..73d8ab8 100644 --- a/Modules/CMakeDefaultMakeRuleVariables.cmake +++ b/Modules/CMakeDefaultMakeRuleVariables.cmake @@ -7,11 +7,16 @@ # CMAKE_CXX_CREATE_SHARED_MODULE # CMAKE_C_CREATE_SHARED_LIBRARY # CMAKE_C_CREATE_SHARED_MODULE +# CMAKE_FORTRAN_CREATE_SHARED_LIBRARY +# CMAKE_FORTRAN_CREATE_SHARED_MODULE # CMAKE_CXX_CREATE_STATIC_LIBRARY # CMAKE_C_CREATE_STATIC_LIBRARY +# CMAKE_FORTRAN_CREATE_STATIC_LIBRARY # CMAKE_CXX_COMPILE_OBJECT # CMAKE_C_COMPILE_OBJECT +# CMAKE_FORTRAN_COMPILE_OBJECT # CMAKE_C_LINK_EXECUTABLE +# CMAKE_FORTRAN_LINK_EXECUTABLE # CMAKE_CXX_LINK_EXECUTABLE # variables supplied by the generator at use time @@ -55,6 +60,7 @@ IF(NOT CMAKE_CXX_CREATE_SHARED_MODULE) SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) ENDIF(NOT CMAKE_CXX_CREATE_SHARED_MODULE) + # create a C shared library IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY) SET(CMAKE_C_CREATE_SHARED_LIBRARY @@ -66,6 +72,17 @@ IF(NOT CMAKE_C_CREATE_SHARED_MODULE) SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY}) ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE) +# create a FORTRAN shared library +IF(NOT CMAKE_FORTRAN_CREATE_SHARED_LIBRARY) + SET(CMAKE_FORTRAN_CREATE_SHARED_LIBRARY + "<CMAKE_FORTRAN_COMPILER> <CMAKE_SHARED_LIBRARY_FORTRAN_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_FORTRAN_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_FORTRAN_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") +ENDIF(NOT CMAKE_FORTRAN_CREATE_SHARED_LIBRARY) + +# create a FORTRAN shared module just copy the shared library rule +IF(NOT CMAKE_FORTRAN_CREATE_SHARED_MODULE) + SET(CMAKE_FORTRAN_CREATE_SHARED_MODULE ${CMAKE_FORTRAN_CREATE_SHARED_LIBRARY}) +ENDIF(NOT CMAKE_FORTRAN_CREATE_SHARED_MODULE) + # create a C++ static library IF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY) SET(CMAKE_CXX_CREATE_STATIC_LIBRARY @@ -80,6 +97,13 @@ IF(NOT CMAKE_C_CREATE_STATIC_LIBRARY) "<CMAKE_RANLIB> <TARGET> ") ENDIF(NOT CMAKE_C_CREATE_STATIC_LIBRARY) +# create a Fortran static library +IF(NOT CMAKE_FORTRAN_CREATE_STATIC_LIBRARY) + SET(CMAKE_FORTRAN_CREATE_STATIC_LIBRARY + "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> " + "<CMAKE_RANLIB> <TARGET> ") +ENDIF(NOT CMAKE_FORTRAN_CREATE_STATIC_LIBRARY) + # compile a C++ file into an object file IF(NOT CMAKE_CXX_COMPILE_OBJECT) SET(CMAKE_CXX_COMPILE_OBJECT @@ -92,12 +116,23 @@ IF(NOT CMAKE_C_COMPILE_OBJECT) "<CMAKE_C_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>") ENDIF(NOT CMAKE_C_COMPILE_OBJECT) +# compile a Fortran file into an object file +IF(NOT CMAKE_FORTRAN_COMPILE_OBJECT) + SET(CMAKE_FORTRAN_COMPILE_OBJECT + "<CMAKE_FORTRAN_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>") +ENDIF(NOT CMAKE_FORTRAN_COMPILE_OBJECT) + IF(NOT CMAKE_C_LINK_EXECUTABLE) SET(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") ENDIF(NOT CMAKE_C_LINK_EXECUTABLE) +IF(NOT CMAKE_FORTRAN_LINK_EXECUTABLE) + SET(CMAKE_FORTRAN_LINK_EXECUTABLE + "<CMAKE_FORTRAN_COMPILER> <CMAKE_FORTRAN_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") +ENDIF(NOT CMAKE_FORTRAN_LINK_EXECUTABLE) + IF(NOT CMAKE_CXX_LINK_EXECUTABLE) SET(CMAKE_CXX_LINK_EXECUTABLE |