diff options
Diffstat (limited to 'Modules/CMakeFortranInformation.cmake')
-rw-r--r-- | Modules/CMakeFortranInformation.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 835ffcf..aa48df7 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -51,6 +51,10 @@ if(CMAKE_Fortran_SIZEOF_DATA_PTR) unset(CMAKE_Fortran_ABI_FILES) endif() +if(CMAKE_Fortran_COMPILER_LINKS_STATICALLY) + set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) +endif() + # This should be included before the _INIT variables are # used to initialize the cache. Since the rule variables # have if blocks on them, users can still define them here. @@ -194,7 +198,7 @@ endif() # Create a static archive incrementally for large object file counts. # If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these. if(NOT DEFINED CMAKE_Fortran_ARCHIVE_CREATE) - set(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>") endif() if(NOT DEFINED CMAKE_Fortran_ARCHIVE_APPEND) set(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>") |