diff options
author | Brad King <brad.king@kitware.com> | 2018-10-29 18:21:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-29 18:23:58 (GMT) |
commit | 8d782adbce56d3e81dd361b5ef6e9ff781a6d436 (patch) | |
tree | 85b1b2dbd8417e44833f88d6ae1ae99200744b37 | |
parent | fd02538974dd952a8639d371c2c0067d30d5469a (diff) | |
download | CMake-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.cmake | 2 |
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") |