diff --git a/.circleci/config.yml b/.circleci/config.yml index 720922450fcc..fbc71596ab1a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,20 +42,20 @@ workflows: ctest_options: "-L 'ESSENTIAL' --output-on-failure" persist_workspace: true # Needed for MAPL tutorials - # Builds MAPL like UFS does (no pFlogger, static) + # Builds MAPL without PFLOGGER and FARGPARSE - ci/build: - name: build-UFS-MAPL-on-<< matrix.compiler >> + name: build-MAPL-without-pFlogger-and-fArgParse-on-<< matrix.compiler >> context: - docker-hub-creds matrix: parameters: - compiler: [ifort] + compiler: [gfortran, ifort] baselibs_version: *baselibs_version repo: MAPL mepodevelop: false remove_flap: true remove_pflogger: true - extra_cmake_options: "-DBUILD_WITH_PFLOGGER=OFF -DBUILD_WITH_FARGPARSE=OFF -DUSE_EXTDATA2G=OFF -DBUILD_SHARED_MAPL=OFF" + extra_cmake_options: "-DBUILD_WITH_PFLOGGER=OFF -DBUILD_WITH_FARGPARSE=OFF" run_unit_tests: true ctest_options: "-L 'ESSENTIAL' --output-on-failure" diff --git a/CHANGELOG.md b/CHANGELOG.md index 0987c58f50ac..977d9a2b5e7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removes backward compatibility for MAPL_FargparseCLI functions. Only accepts function usage in which the result is of MAPL_CapOptions type. - Remove FLAP support. +- Remove `BUILD_SHARED_MAPL` CMake option. MAPL3 is now always built as a shared library. ### Added @@ -42,9 +43,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Now gives the name of the timer that has not been stopped when finalizing a profiler. - Changed all ESMF_AttributeGet and ESMF_AttributeSet to ESMF_InfoGet and ESMF_InfoSet respectively as old calls will be deprecated soon. -- Updated `components.yaml` - - ESMA_env v4.0.0 (Baselibs 7, new yaFyaml interfaces) -- Updated CI to use Baselibs 7 - Update executables using FLAP to use fArgParse - Update `Findudunits.cmake` to link with libdl and look for the `udunits2.xml` file (as some MAPL tests require it) diff --git a/CMakeLists.txt b/CMakeLists.txt index d705c53beada..99e1afaa8a51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,14 +61,6 @@ endif () # This tells cmake to assume MAPL's cmake directory is the first place to look list (PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") -option (BUILD_SHARED_MAPL "Build shared MAPL libraries" ON) -if (BUILD_SHARED_MAPL) - set (MAPL_LIBRARY_TYPE SHARED) -else () - set (MAPL_LIBRARY_TYPE STATIC) -endif() -message (STATUS "Building MAPL as ${MAPL_LIBRARY_TYPE} libraries") - # Some users of MAPL build GFE libraries inline with their application # using an add_subdirectory() call rather than as a pre-build library. # This would then populate the target already leading to find_package() diff --git a/MAPL/CMakeLists.txt b/MAPL/CMakeLists.txt index 75043fcacbcc..89cf1671c2ad 100644 --- a/MAPL/CMakeLists.txt +++ b/MAPL/CMakeLists.txt @@ -5,7 +5,7 @@ esma_add_library (${this} SRCS MAPL.F90 DEPENDENCIES MAPL.base MAPL.generic MAPL.pfio MAPL_cfio_r4 MAPL.gridcomps MAPL.orbit MAPL.griddedio MAPL.field_utils ${EXTDATA_TARGET} ESMF::ESMF NetCDF::NetCDF_Fortran MPI::MPI_Fortran - TYPE ${MAPL_LIBRARY_TYPE} + TYPE SHARED ) target_compile_definitions (${this} PRIVATE $<$:BUILD_WITH_EXTDATA2G>) diff --git a/MAPL_cfio/CMakeLists.txt b/MAPL_cfio/CMakeLists.txt index 16d5f4b931c3..fd79843a5e95 100644 --- a/MAPL_cfio/CMakeLists.txt +++ b/MAPL_cfio/CMakeLists.txt @@ -30,7 +30,7 @@ set (lib MAPL_cfio_${precision}) esma_add_library (${lib} SRCS ${srcs} DEPENDENCIES ESMF::ESMF NetCDF::NetCDF_Fortran - TYPE ${MAPL_LIBRARY_TYPE} + TYPE SHARED ) if (precision MATCHES "r8") diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt index 97507cf135ed..43061d3ce143 100644 --- a/base/CMakeLists.txt +++ b/base/CMakeLists.txt @@ -70,7 +70,7 @@ esma_add_library( DEPENDENCIES MAPL.shared MAPL.constants MAPL.profiler MAPL.pfio MAPL_cfio_r4 MAPL.field_utils PFLOGGER::pflogger GFTL_SHARED::gftl-shared-v2 GFTL_SHARED::gftl-shared-v1 GFTL::gftl-v2 GFTL::gftl-v1 ESMF::ESMF NetCDF::NetCDF_Fortran MPI::MPI_Fortran - TYPE ${MAPL_LIBRARY_TYPE}) + TYPE SHARED) # We don't want to disable good NAG debugging flags everywhere, but we still need to do it for # interfaces (e.g. MPI) that allow multiple types for the same argument (eg buffer). diff --git a/docs/tutorial/grid_comps/automatic_code_generator_example/CMakeLists.txt b/docs/tutorial/grid_comps/automatic_code_generator_example/CMakeLists.txt index 8422b3a79540..98456826910c 100644 --- a/docs/tutorial/grid_comps/automatic_code_generator_example/CMakeLists.txt +++ b/docs/tutorial/grid_comps/automatic_code_generator_example/CMakeLists.txt @@ -4,7 +4,7 @@ set (srcs ACG_GridComp.F90 ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE SHARED) target_link_libraries(${this} PRIVATE ESMF::ESMF) diff --git a/docs/tutorial/grid_comps/hello_world_gridcomp/CMakeLists.txt b/docs/tutorial/grid_comps/hello_world_gridcomp/CMakeLists.txt index 0e74c76742a1..ca6b77e9582c 100644 --- a/docs/tutorial/grid_comps/hello_world_gridcomp/CMakeLists.txt +++ b/docs/tutorial/grid_comps/hello_world_gridcomp/CMakeLists.txt @@ -3,7 +3,7 @@ set (srcs HelloWorld_GridComp.F90 ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE SHARED) if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG") target_link_libraries(${this} PRIVATE OpenMP::OpenMP_Fortran) endif () diff --git a/docs/tutorial/grid_comps/leaf_comp_a/CMakeLists.txt b/docs/tutorial/grid_comps/leaf_comp_a/CMakeLists.txt index d912da16f28d..754e9144ca51 100644 --- a/docs/tutorial/grid_comps/leaf_comp_a/CMakeLists.txt +++ b/docs/tutorial/grid_comps/leaf_comp_a/CMakeLists.txt @@ -3,7 +3,7 @@ set (srcs AAA_GridComp.F90 ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE SHARED) if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG") target_link_libraries(${this} PRIVATE OpenMP::OpenMP_Fortran) endif () diff --git a/docs/tutorial/grid_comps/leaf_comp_b/CMakeLists.txt b/docs/tutorial/grid_comps/leaf_comp_b/CMakeLists.txt index e2ae84142283..7b326cd24105 100644 --- a/docs/tutorial/grid_comps/leaf_comp_b/CMakeLists.txt +++ b/docs/tutorial/grid_comps/leaf_comp_b/CMakeLists.txt @@ -3,7 +3,7 @@ set (srcs BBB_GridComp.F90 ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE SHARED) if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG") target_link_libraries(${this} PRIVATE OpenMP::OpenMP_Fortran) endif () diff --git a/docs/tutorial/grid_comps/parent_with_no_children/CMakeLists.txt b/docs/tutorial/grid_comps/parent_with_no_children/CMakeLists.txt index c9c4299b76bd..9c825390f49e 100644 --- a/docs/tutorial/grid_comps/parent_with_no_children/CMakeLists.txt +++ b/docs/tutorial/grid_comps/parent_with_no_children/CMakeLists.txt @@ -3,7 +3,7 @@ set (srcs ParentNoChildren_GridComp.F90 ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE SHARED) if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG") target_link_libraries(${this} PRIVATE OpenMP::OpenMP_Fortran) endif () diff --git a/docs/tutorial/grid_comps/parent_with_one_child/CMakeLists.txt b/docs/tutorial/grid_comps/parent_with_one_child/CMakeLists.txt index b5da305f8e82..f370d2a789b9 100644 --- a/docs/tutorial/grid_comps/parent_with_one_child/CMakeLists.txt +++ b/docs/tutorial/grid_comps/parent_with_one_child/CMakeLists.txt @@ -3,7 +3,7 @@ set (srcs ParentOneChild_GridComp.F90 ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE SHARED) if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG") target_link_libraries(${this} PRIVATE OpenMP::OpenMP_Fortran) endif () diff --git a/docs/tutorial/grid_comps/parent_with_two_children/CMakeLists.txt b/docs/tutorial/grid_comps/parent_with_two_children/CMakeLists.txt index 66b39a86a6b3..406462c13db8 100644 --- a/docs/tutorial/grid_comps/parent_with_two_children/CMakeLists.txt +++ b/docs/tutorial/grid_comps/parent_with_two_children/CMakeLists.txt @@ -3,7 +3,7 @@ set (srcs ParentTwoSiblings_GridComp.F90 ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL TYPE SHARED) if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG") target_link_libraries(${this} PRIVATE OpenMP::OpenMP_Fortran) endif () diff --git a/field_utils/CMakeLists.txt b/field_utils/CMakeLists.txt index 4c7fec6830c1..7fec50a25cf0 100644 --- a/field_utils/CMakeLists.txt +++ b/field_utils/CMakeLists.txt @@ -25,7 +25,7 @@ endif () esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL.shared PFLOGGER::pflogger udunits2f - TYPE ${MAPL_LIBRARY_TYPE} + TYPE SHARED ) #add_subdirectory(specs) diff --git a/generic/CMakeLists.txt b/generic/CMakeLists.txt index 06b6468771dc..e4645b524c30 100644 --- a/generic/CMakeLists.txt +++ b/generic/CMakeLists.txt @@ -65,7 +65,7 @@ esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL.oomph MAPL.shared MAPL.profiler MAPL.base PFLOGGER::pflogger GFTL_SHARED::gftl-shared-v2 GFTL_SHARED::gftl-shared-v1 GFTL::gftl-v2 GFTL::gftl-v1 - TYPE ${MAPL_LIBRARY_TYPE} + TYPE SHARED ) target_include_directories (${this} PUBLIC $) diff --git a/generic3g/CMakeLists.txt b/generic3g/CMakeLists.txt index b635ee93bcaf..5cad6ecfa2b8 100644 --- a/generic3g/CMakeLists.txt +++ b/generic3g/CMakeLists.txt @@ -57,7 +57,7 @@ endif () esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL.regridder_mgr MAPL.geom_mgr MAPL.shared MAPL.profiler MAPL.base MAPL.hconfig_utils YAFYAML::yafyaml PFLOGGER::pflogger GFTL_SHARED::gftl-shared-v2 GFTL::gftl-v2 - TYPE ${MAPL_LIBRARY_TYPE} + TYPE SHARED ) add_subdirectory(specs) add_subdirectory(registry) diff --git a/geom_mgr/CMakeLists.txt b/geom_mgr/CMakeLists.txt index ed9e2de00ac2..cf5fb5a0a41e 100644 --- a/geom_mgr/CMakeLists.txt +++ b/geom_mgr/CMakeLists.txt @@ -25,7 +25,7 @@ set(srcs esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL.pfio MAPL.base MAPL.shared MAPL.field_utils MAPL.hconfig_utils GFTL::gftl-v2 - TYPE ${MAPL_LIBRARY_TYPE} + TYPE SHARED ) add_subdirectory(MaplGeom) diff --git a/gridcomps/CMakeLists.txt b/gridcomps/CMakeLists.txt index 38bd907117ea..f6d175fb8a49 100644 --- a/gridcomps/CMakeLists.txt +++ b/gridcomps/CMakeLists.txt @@ -4,7 +4,7 @@ esma_add_library (${this} SRCS MAPL_GridComps.F90 DEPENDENCIES MAPL.base MAPL.pfio MAPL_cfio_r4 MAPL.cap $<$:FARGPARSE::fargparse> - TYPE ${MAPL_LIBRARY_TYPE} + TYPE SHARED ) target_include_directories (${this} PUBLIC diff --git a/gridcomps/Cap/CMakeLists.txt b/gridcomps/Cap/CMakeLists.txt index 34dc4fd16b6c..071ff6f539d0 100644 --- a/gridcomps/Cap/CMakeLists.txt +++ b/gridcomps/Cap/CMakeLists.txt @@ -12,7 +12,7 @@ endif() esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL.constants MAPL.base MAPL.profiler MAPL.history - MAPL.ExtData ${EXTDATA2G_TARGET} TYPE ${MAPL_LIBRARY_TYPE}) + MAPL.ExtData ${EXTDATA2G_TARGET} TYPE SHARED) # We don't want to disable good NAG debugging flags everywhere, but we still need to do it for # interfaces (e.g. MPI) that allow multiple types for the same argument (eg buffer). if (DUSTY) diff --git a/gridcomps/ExtData/CMakeLists.txt b/gridcomps/ExtData/CMakeLists.txt index 51ccf7a3a3be..b6267626ba18 100644 --- a/gridcomps/ExtData/CMakeLists.txt +++ b/gridcomps/ExtData/CMakeLists.txt @@ -7,7 +7,7 @@ set (srcs ) esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL.constants MAPL.base MAPL.generic MAPL.pfio - MAPL.griddedio MAPL_cfio_r4 TYPE ${MAPL_LIBRARY_TYPE}) + MAPL.griddedio MAPL_cfio_r4 TYPE SHARED) target_link_libraries (${this} PUBLIC GFTL::gftl GFTL_SHARED::gftl-shared ESMF::ESMF NetCDF::NetCDF_Fortran PRIVATE MPI::MPI_Fortran) diff --git a/gridcomps/ExtData2G/CMakeLists.txt b/gridcomps/ExtData2G/CMakeLists.txt index 52f6507fe5ae..10fae8e9c7af 100644 --- a/gridcomps/ExtData2G/CMakeLists.txt +++ b/gridcomps/ExtData2G/CMakeLists.txt @@ -23,7 +23,7 @@ set (srcs ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL.base MAPL.generic MAPL.griddedio TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL.base MAPL.generic MAPL.griddedio TYPE SHARED) target_link_libraries (${this} PUBLIC GFTL::gftl GFTL_SHARED::gftl-shared ESMF::ESMF NetCDF::NetCDF_Fortran PRIVATE MPI::MPI_Fortran) target_include_directories (${this} PUBLIC $) diff --git a/gridcomps/History/CMakeLists.txt b/gridcomps/History/CMakeLists.txt index 58af30a30b27..17a921e0ee55 100644 --- a/gridcomps/History/CMakeLists.txt +++ b/gridcomps/History/CMakeLists.txt @@ -12,7 +12,7 @@ set (srcs ) esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL.constants MAPL.base MAPL.generic MAPL.profiler MAPL.griddedio - TYPE ${MAPL_LIBRARY_TYPE}) + TYPE SHARED) target_link_libraries (${this} PUBLIC GFTL::gftl GFTL_SHARED::gftl-shared ESMF::ESMF NetCDF::NetCDF_Fortran PRIVATE MPI::MPI_Fortran) diff --git a/gridcomps/Orbit/CMakeLists.txt b/gridcomps/Orbit/CMakeLists.txt index ed51cb1e23cb..5e3babcea984 100644 --- a/gridcomps/Orbit/CMakeLists.txt +++ b/gridcomps/Orbit/CMakeLists.txt @@ -4,7 +4,7 @@ set (srcs MAPL_OrbGridCompMod.F90 ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL.constants MAPL.base MAPL.generic TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL.constants MAPL.base MAPL.generic TYPE SHARED) target_link_libraries (${this} PUBLIC GFTL::gftl GFTL_SHARED::gftl-shared ESMF::ESMF NetCDF::NetCDF_Fortran PRIVATE MPI::MPI_Fortran) diff --git a/gridcomps/cap3g/CMakeLists.txt b/gridcomps/cap3g/CMakeLists.txt index 39630cb87b13..3de4fec40e79 100644 --- a/gridcomps/cap3g/CMakeLists.txt +++ b/gridcomps/cap3g/CMakeLists.txt @@ -9,6 +9,6 @@ find_package (MPI REQUIRED) esma_add_library(${this} SRCS ${srcs} - DEPENDENCIES MAPL.generic3g TYPE ${MAPL_LIBRARY_TYPE}) + DEPENDENCIES MAPL.generic3g TYPE SHARED) add_subdirectory(tests EXCLUDE_FROM_ALL) diff --git a/griddedio/CMakeLists.txt b/griddedio/CMakeLists.txt index db7322918aef..6c53f6eddd21 100644 --- a/griddedio/CMakeLists.txt +++ b/griddedio/CMakeLists.txt @@ -11,7 +11,7 @@ set (srcs ) esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL.constants MAPL.base MAPL.pfio - MAPL_cfio_r4 TYPE ${MAPL_LIBRARY_TYPE}) + MAPL_cfio_r4 TYPE SHARED) target_link_libraries (${this} PUBLIC GFTL::gftl GFTL_SHARED::gftl-shared ESMF::ESMF NetCDF::NetCDF_Fortran PRIVATE MPI::MPI_Fortran) diff --git a/hconfig_utils/CMakeLists.txt b/hconfig_utils/CMakeLists.txt index f6234916ec48..da99e1a1afeb 100644 --- a/hconfig_utils/CMakeLists.txt +++ b/hconfig_utils/CMakeLists.txt @@ -16,7 +16,7 @@ endif () esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL.shared PFLOGGER::pflogger - TYPE ${MAPL_LIBRARY_TYPE} + TYPE SHARED ) target_include_directories (${this} PUBLIC diff --git a/mapl3g/CMakeLists.txt b/mapl3g/CMakeLists.txt index 90af74863a69..a8de27c0f780 100644 --- a/mapl3g/CMakeLists.txt +++ b/mapl3g/CMakeLists.txt @@ -9,7 +9,7 @@ esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.generic3g MAPL.pfio MAPL.cap3g MAPL.gridcomps MAPL.griddedio MAPL.field_utils ${EXTDATA_TARGET} ESMF::ESMF NetCDF::NetCDF_Fortran MPI::MPI_Fortran PFLOGGER::pflogger - TYPE ${MAPL_LIBRARY_TYPE} + TYPE SHARED ) target_compile_definitions (${this} PRIVATE $<$:BUILD_WITH_EXTDATA2G>) diff --git a/oomph/CMakeLists.txt b/oomph/CMakeLists.txt index 3d0da8cebf74..356966ac9f37 100644 --- a/oomph/CMakeLists.txt +++ b/oomph/CMakeLists.txt @@ -30,5 +30,5 @@ set (srcs esma_add_library(${this} SRCS ${srcs} - DEPENDENCIES MAPL.base GFTL_SHARED::gftl-shared-v2 GFTL::gftl-v2 TYPE ${MAPL_LIBRARY_TYPE} + DEPENDENCIES MAPL.base GFTL_SHARED::gftl-shared-v2 GFTL::gftl-v2 TYPE SHARED ) diff --git a/pfio/CMakeLists.txt b/pfio/CMakeLists.txt index 126b4d28460d..b84d1481770e 100644 --- a/pfio/CMakeLists.txt +++ b/pfio/CMakeLists.txt @@ -118,7 +118,7 @@ if (BUILD_WITH_PFLOGGER) find_package (PFLOGGER REQUIRED) endif () -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL.profiler NetCDF::NetCDF_Fortran NetCDF::NetCDF_C TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.shared MAPL.profiler NetCDF::NetCDF_Fortran NetCDF::NetCDF_C TYPE SHARED) target_link_libraries (${this} PUBLIC GFTL::gftl-v2 GFTL_SHARED::gftl-shared-v2 GFTL_SHARED::gftl-shared PFLOGGER::pflogger PRIVATE MPI::MPI_Fortran) # CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280 diff --git a/pflogger_stub/CMakeLists.txt b/pflogger_stub/CMakeLists.txt index 6afb3750db9f..b8fe87fd49f9 100644 --- a/pflogger_stub/CMakeLists.txt +++ b/pflogger_stub/CMakeLists.txt @@ -6,7 +6,7 @@ set (srcs pflogger_stub.F90 ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES GFTL_SHARED::gftl-shared TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES GFTL_SHARED::gftl-shared TYPE SHARED) add_library(PFLOGGER::pflogger ALIAS ${this}) target_include_directories (${this} PUBLIC $) diff --git a/pfunit/CMakeLists.txt b/pfunit/CMakeLists.txt index d6102349668e..77e4cff4377e 100644 --- a/pfunit/CMakeLists.txt +++ b/pfunit/CMakeLists.txt @@ -8,7 +8,7 @@ set (srcs MAPL_Initialize.F90 ) -esma_add_library (${this} EXCLUDE_FROM_ALL SRCS ${srcs} NOINSTALL TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} EXCLUDE_FROM_ALL SRCS ${srcs} NOINSTALL TYPE SHARED) target_link_libraries (${this} MAPL.shared MAPL.field_utils PFUNIT::pfunit ESMF::ESMF NetCDF::NetCDF_Fortran) set_target_properties (${this} PROPERTIES Fortran_MODULE_DIRECTORY ${include_${this}}) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index a62ecec7ab23..82c889e57a8c 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -53,7 +53,7 @@ set (srcs MAPL_Profiler.F90 ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES GFTL_SHARED::gftl-shared GFTL::gftl-v1 GFTL::gftl-v2 PFLOGGER::pflogger MAPL.shared MPI::MPI_Fortran TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES GFTL_SHARED::gftl-shared GFTL::gftl-v1 GFTL::gftl-v2 PFLOGGER::pflogger MAPL.shared MPI::MPI_Fortran TYPE SHARED) target_include_directories (${this} PRIVATE ${MAPL_SOURCE_DIR}/include) # CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280 diff --git a/regridder_mgr/CMakeLists.txt b/regridder_mgr/CMakeLists.txt index d96a3a53e3cf..f74021a507d4 100644 --- a/regridder_mgr/CMakeLists.txt +++ b/regridder_mgr/CMakeLists.txt @@ -30,7 +30,7 @@ set(srcs esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL.geom_mgr MAPL.pfio MAPL.base MAPL.shared MAPL.field_utils GFTL::gftl-v2 - TYPE ${MAPL_LIBRARY_TYPE} + TYPE SHARED ) target_include_directories (${this} PUBLIC diff --git a/shared/CMakeLists.txt b/shared/CMakeLists.txt index d08cff352796..796413d727b8 100644 --- a/shared/CMakeLists.txt +++ b/shared/CMakeLists.txt @@ -34,7 +34,7 @@ set (srcs Shmem/Shmem.F90 Shmem/Shmem_implementation.F90 ) -esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.constants GFTL_SHARED::gftl-shared GFTL_SHARED::gftl-shared-v2 MPI::MPI_Fortran PFLOGGER::pflogger TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL.constants GFTL_SHARED::gftl-shared GFTL_SHARED::gftl-shared-v2 MPI::MPI_Fortran PFLOGGER::pflogger TYPE SHARED) # We don't want to disable good NAG debugging flags everywhere, but we still need to do it for # interfaces (e.g. MPI) that allow multiple types for the same argument (eg buffer). diff --git a/shared/Constants/CMakeLists.txt b/shared/Constants/CMakeLists.txt index b2acf46cdc55..c0b9f194b654 100644 --- a/shared/Constants/CMakeLists.txt +++ b/shared/Constants/CMakeLists.txt @@ -7,7 +7,7 @@ set (srcs Constants.F90 ) -esma_add_library (${this} SRCS ${srcs} TYPE ${MAPL_LIBRARY_TYPE}) +esma_add_library (${this} SRCS ${srcs} TYPE SHARED) target_include_directories (${this} PUBLIC $) diff --git a/udunits2f/CMakeLists.txt b/udunits2f/CMakeLists.txt index 258d2c88440b..9ddd633fc535 100644 --- a/udunits2f/CMakeLists.txt +++ b/udunits2f/CMakeLists.txt @@ -13,7 +13,7 @@ list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") esma_add_library(${this} SRCS ${srcs} - TYPE ${MAPL_LIBRARY_TYPE} + TYPE SHARED ) find_package(udunits REQUIRED)