summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Fujitsu-Fortran.cmake
diff options
context:
space:
mode:
authorEisuke Kawashima <15070-e-kwsm@users.noreply.gitlab.com>2021-05-03 17:43:34 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-06 17:11:48 (GMT)
commit284d12a426879a61adc61fb210e35b01f1a1e1ad (patch)
treec6c5a2d67a638d17d0abecdde1a3990444a7dfec /Modules/Compiler/Fujitsu-Fortran.cmake
parente0b4a22ca6874a15912eea86cde16f47cb5f9d93 (diff)
downloadCMake-284d12a426879a61adc61fb210e35b01f1a1e1ad.zip
CMake-284d12a426879a61adc61fb210e35b01f1a1e1ad.tar.gz
CMake-284d12a426879a61adc61fb210e35b01f1a1e1ad.tar.bz2
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
Diffstat (limited to 'Modules/Compiler/Fujitsu-Fortran.cmake')
-rw-r--r--Modules/Compiler/Fujitsu-Fortran.cmake2
1 files changed, 1 insertions, 1 deletions
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
- "<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")