CMake/Modules/Compiler/Fujitsu-Fortran.cmake
Eisuke Kawashima 284d12a426 Fujitsu: Make explicit Fortran preprocessing under Ninja more robust
Tell the Fortran compiler to write preprocessor output directly to a
file, as we do for the GNU compiler.  The previous "redirect stdout"
approach could break checks using flags that add information to stdout
when called with `-###`.

Fixes: #22156
2021-05-06 13:11:48 -04:00

17 lines
506 B
CMake

include(Compiler/Fujitsu)
__compiler_fujitsu(Fortran)
set(CMAKE_Fortran_SUBMODULE_SEP ".")
set(CMAKE_Fortran_SUBMODULE_EXT ".smod")
set(CMAKE_Fortran_PREPROCESS_SOURCE
"<CMAKE_Fortran_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -Cpp -P <SOURCE> -o <PREPROCESSED_SOURCE>")
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-Cpp")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Fixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Free")
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT "")
set(CMAKE_Fortran_MODDIR_FLAG "-M ")