1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-16 22:37:30 +08:00

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
This commit is contained in:
Eisuke Kawashima
2021-05-04 02:43:34 +09:00
committed by Brad King
parent e0b4a22ca6
commit 284d12a426

View File

@@ -5,7 +5,7 @@ set(CMAKE_Fortran_SUBMODULE_SEP ".")
set(CMAKE_Fortran_SUBMODULE_EXT ".smod")
set(CMAKE_Fortran_PREPROCESS_SOURCE
"<CMAKE_Fortran_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -Cpp -E <SOURCE> > <PREPROCESSED_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")