NOAA-EMC / NCEPLIBS

Top level repo containing submodules for NCEPLIBS and associated dependencies for superproject builds
Other
42 stars 18 forks source link

Add Fortran compiler flags for supporting gfortran-10 #106

Closed climbfuji closed 4 years ago

climbfuji commented 4 years ago

Two items related to this issue:

 if(${CMAKE_Fortran_COMPILER_ID} MATCHES "^(GNU)$" AND ${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -w -fallow-argument-mismatch -fallow-invalid-boz")
 endif()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}  existing_fortran_flags")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  existing_c_flags")

List of libraries that need to be updated:

aerorahul commented 4 years ago

This should be done in the repos as well. Not everyone uses the umbrella build. And it is especially not used when installing/updating a single or handful of libraries.

An alternative is to set environment variables.

kgerheiser commented 4 years ago

I'll just go through each library and add it

aerorahul commented 4 years ago

@kgerheiser If you could also add the following:

set(CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS} ...) 

The above will allow passing FFLAGS from the environment.

Same for CMAKE_C_FLAGS.

We can use this with a list of NCEPLIBS and split the work.