mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 02:39:48 -06:00
NAG-Fortran: Do not repeat preprocessing with Ninja on Apple platforms
The Ninja generator uses separate preprocessing and compilation steps. Do not pass `-fpp` when compiling an already-preprocessed source. Issue: #25900
This commit is contained in:
committed by
Brad King
parent
91bb8dd872
commit
4af20bb794
@@ -3,9 +3,13 @@
|
||||
|
||||
set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood.
|
||||
|
||||
# Need -fpp explicitly on case-insensitive filesystem.
|
||||
set(CMAKE_Fortran_COMPILE_OBJECT
|
||||
"<CMAKE_Fortran_COMPILER> -fpp -o <OBJECT> <DEFINES> <INCLUDES> <FLAGS> -c <SOURCE>")
|
||||
# FIXME(#25900): We need -fpp explicitly on case-insensitive filesystems,
|
||||
# but this does not work with the Ninja generator's separate preprocessing
|
||||
# and compilation steps.
|
||||
if(NOT CMAKE_GENERATOR MATCHES "^Ninja")
|
||||
set(CMAKE_Fortran_COMPILE_OBJECT
|
||||
"<CMAKE_Fortran_COMPILER> -fpp -o <OBJECT> <DEFINES> <INCLUDES> <FLAGS> -c <SOURCE>")
|
||||
endif()
|
||||
|
||||
set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-Wl,-compatibility_version -Wl,")
|
||||
set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-Wl,-current_version -Wl,")
|
||||
|
||||
Reference in New Issue
Block a user