summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/GNU-Fortran.cmake
Commit message (Collapse)AuthorAgeFilesLines
* GNU: Remove duplicate and unnecessary optimization flags for gfortranBrad King2023-11-211-4/+0
| | | | | | | | Since commit a66004bee0 (Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain files, 2016-07-05, v3.7.0-rc1~392^2) we've accidentally been adding extra optimization flags instead of replacing unwanted flags. Fixes: #25434
* Fortran: Add Fortran_PREPROCESS propertyPeter Hill2020-05-211-0/+5
| | | | Issue: #18870
* Fortran: Fix submodule file names across compilersBrad King2019-02-141-0/+3
| | | | | | | | | The naming convention for submodule files varies across compilers. Add a table to the compiler information modules and thread the information through to the Fortran module dependency parser. Fill out the table for compiler ids known to support Fortran submodules. Fixes: #18746
* Ninja: Fix references to source files in gfortran diagnosticsRaul Laasner2017-08-231-0/+2
| | | | | | | | | The Ninja generator preprocesses and compiles separately for Fortran. When compiling, tell gfortran that the source is already preprocessed so that it will honor the `# <line>` directives when producing diagnostics messages. Fixes: #17160
* Ninja: Add explicit preprocessing step for FortranBrad King2016-09-221-0/+3
| | | | | | | | | | All Fortran sources need to be preprocessed before any source may be compiled so that module dependencies can be (later) extracted. Factor out an explicit preprocessing step preceding compilation. Use Ninja depfile dependencies on the preprocessing step and then compile the already-preprocessed source with a separate build statement that depends explicitly only on the preprocessor output. Later we will insert dynamic discovery of module dependencies between these steps.
* Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain filesBrad King2016-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Document these variables. Change our convention for setting these variables from: set(CMAKE_C_FLAGS_INIT "...") to string(APPEND CMAKE_C_FLAGS_INIT " ...") so that any value previously set by a toolchain file will be used. Automate the conversion with: sed -i 's/set *(\(CMAKE_\(C\|CXX\|Fortran\|RC\|ASM\|${[^}]\+}\)_FLAGS\(_[^_]\+\)\?_INIT \+"\)/string(APPEND \1 /' \ Modules/Compiler/*.cmake Modules/Platform/*.cmake and follow up with some manual fixes (e.g. to cases that already meant to append). Also revert the automated changes to contexts that are not protected from running multiple times.
* GNU: Do not use -isystem with gfortranBrad King2015-03-261-0/+3
| | | | | | | The compiler documents that USE statements search for ".mod" files in directories specified with -I, but not -isystem. Reported-by: Hugh Sorby <h.sorby@auckland.ac.nz>
* Makefile: Add assembly and preprocessed targets for FortranTim Gallagher2014-11-101-5/+0
| | | | Extend the FortranOnly test to cover "make <src>.i" targets.
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-5/+5
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Fortran: Add support for free- and fixed-form flagsBrad King2011-08-311-0/+3
| | | | | | | Define a "Fortran_FORMAT" target and source file property. Initialize the target property from a "CMAKE_Fortran_FORMAT" variable. Interpret values "FIXED" and "FREE" to indicate the source file format. Append corresponding flags to the compiler command line.
* Split GNU compiler information filesBrad King2009-12-021-1/+14
| | | | | | | | | | | | | | This moves GNU compiler flags into new-style modules Compiler/GNU-<lang>.cmake Platform/<os>-GNU-<lang>.cmake We use language-independent helper modules Compiler/GNU.cmake Platform/<os>-GNU.cmake to define macros consolidating the information.
* ENH: Implicit link info for C, CXX, and FortranBrad King2009-07-231-0/+1
This teaches CMake to detect implicit link information for C, C++, and Fortran compilers. We detect the implicit linker search directories and implicit linker options for UNIX-like environments using verbose output from compiler front-ends. We store results in new variables called CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES The implicit libraries can contain linker flags as well as library names.