From 284d12a426879a61adc61fb210e35b01f1a1e1ad Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima <15070-e-kwsm@users.noreply.gitlab.com> Date: Tue, 4 May 2021 02:43:34 +0900 Subject: 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 --- Modules/Compiler/Fujitsu-Fortran.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Compiler/Fujitsu-Fortran.cmake b/Modules/Compiler/Fujitsu-Fortran.cmake index 0f687bc..face2d6 100644 --- a/Modules/Compiler/Fujitsu-Fortran.cmake +++ b/Modules/Compiler/Fujitsu-Fortran.cmake @@ -5,7 +5,7 @@ set(CMAKE_Fortran_SUBMODULE_SEP ".") set(CMAKE_Fortran_SUBMODULE_EXT ".smod") set(CMAKE_Fortran_PREPROCESS_SOURCE - " -Cpp -E > ") + " -Cpp -P -o ") set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-Cpp") set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Fixed") -- cgit v0.12