diff options
author | Brad King <brad.king@kitware.com> | 2024-04-16 12:53:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-04-16 12:53:56 (GMT) |
commit | 8f7049112d3a5aaed4988bcef5e61cada3f88cff (patch) | |
tree | 29bb1216e36b1b34f6a50a9777398cba51893913 /Modules/Platform | |
parent | f494bbaf8f797cc6658f7328b4803bb89baaf48a (diff) | |
parent | 4af20bb7940bbbfb624a231b6394a996f5dd755a (diff) | |
download | CMake-8f7049112d3a5aaed4988bcef5e61cada3f88cff.zip CMake-8f7049112d3a5aaed4988bcef5e61cada3f88cff.tar.gz CMake-8f7049112d3a5aaed4988bcef5e61cada3f88cff.tar.bz2 |
Merge topic 'nag-fortran-ninja'
4af20bb794 NAG-Fortran: Do not repeat preprocessing with Ninja on Apple platforms
91bb8dd872 NAG-Fortran: Fix MODULE library creation on Apple platforms
e056006116 NAG-Fortran: Tell the Ninja generator how to preprocess Fortran sources
765a611956 NAG-Fortran: Added initial default compilation flags
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9407
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Apple-NAG-Fortran.cmake | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Modules/Platform/Apple-NAG-Fortran.cmake b/Modules/Platform/Apple-NAG-Fortran.cmake index 8d3e741..828d7ab 100644 --- a/Modules/Platform/Apple-NAG-Fortran.cmake +++ b/Modules/Platform/Apple-NAG-Fortran.cmake @@ -3,12 +3,17 @@ 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,") +set(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS "-Wl,-bundle") set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-Wl,-shared") set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-install_name -Wl,") set(CMAKE_Fortran_CREATE_SHARED_LIBRARY |