GNU-Fortran.cmake 735 B

1234567891011121314151617181920212223
  1. include(Compiler/GNU)
  2. __compiler_gnu(Fortran)
  3. set(CMAKE_Fortran_SUBMODULE_SEP "@")
  4. set(CMAKE_Fortran_SUBMODULE_EXT ".smod")
  5. set(CMAKE_Fortran_PREPROCESS_SOURCE
  6. "<CMAKE_Fortran_COMPILER> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> -o <PREPROCESSED_SOURCE>")
  7. set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
  8. set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
  9. set(CMAKE_Fortran_POSTPROCESS_FLAG "-fpreprocessed")
  10. # No -DNDEBUG for Fortran.
  11. string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os")
  12. string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
  13. # No -isystem for Fortran because it will not find .mod files.
  14. unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran)
  15. # Fortran-specific feature flags.
  16. set(CMAKE_Fortran_MODDIR_FLAG -J)