ecmwf / multio

MultIO is a runtime-configurable multiplexer for Weather Model output of GRIB data
Apache License 2.0
7 stars 8 forks source link

fixes #4 add cmake fortran module directory using ecbuild method #5

Closed suvarchal closed 7 months ago

suvarchal commented 1 year ago

fixes #4 by adding (with hints from fckit and eccodes)

if(ECBUILD_INSTALL_FORTRAN_MODULES)
    install( DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR}/
             DESTINATION ${INSTALL_INCLUDE_DIR}
             COMPONENT modules)
endif()

to src/multio/CMakeLists.txt.

I considered following working(tested) options before deciding which CMakeLists.txt to add the above snippet to:

FussyDuck commented 1 year ago

CLA assistant check
All committers have signed the CLA.

dsarmany commented 1 year ago

Thank you for this. I suggest a slight modification to the proposed change to make it more consistent with other ECMWF packages:

if( HAVE_FORTRAN AND ECBUILD_INSTALL_FORTRAN_MODULES )
    install( DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR}
             DESTINATION module/multio
             COMPONENT modules )
endif()

Once the change is updated, I'm happy to merge it. (Alternatively, I can also introduce the change to the develop branch outside this PR if that is requested.)

dsarmany commented 7 months ago

Close this as it is fixed already on both develop and 2.1.