summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-29 18:21:15 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-29 18:23:58 (GMT)
commit8d782adbce56d3e81dd361b5ef6e9ff781a6d436 (patch)
tree85b1b2dbd8417e44833f88d6ae1ae99200744b37
parentfd02538974dd952a8639d371c2c0067d30d5469a (diff)
downloadCMake-8d782adbce56d3e81dd361b5ef6e9ff781a6d436.zip
CMake-8d782adbce56d3e81dd361b5ef6e9ff781a6d436.tar.gz
CMake-8d782adbce56d3e81dd361b5ef6e9ff781a6d436.tar.bz2
Flang: Fix command-line used to preprocess sources
Running flang with `-E` now ignores any `-o` option and always prints preprocessed output to stdout. Use shell redirection to place it in a file instead. Fixes: #18497
-rw-r--r--Modules/Compiler/Flang-Fortran.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Compiler/Flang-Fortran.cmake b/Modules/Compiler/Flang-Fortran.cmake
index a1051f4..d522739 100644
--- a/Modules/Compiler/Flang-Fortran.cmake
+++ b/Modules/Compiler/Flang-Fortran.cmake
@@ -2,7 +2,7 @@ include(Compiler/Clang)
__compiler_clang(Fortran)
set(CMAKE_Fortran_PREPROCESS_SOURCE
- "<CMAKE_Fortran_COMPILER> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> -o <PREPROCESSED_SOURCE>")
+ "<CMAKE_Fortran_COMPILER> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")