From 5e2dd0e46528db976c71cf948acdd84fd11fe761 Mon Sep 17 00:00:00 2001 From: Mirco Valentini Date: Tue, 10 Dec 2024 11:22:39 +0000 Subject: [PATCH] Test to reduce build verbosity due to include warnings on CI --- src/ecom/CMakeLists.txt | 41 +++++++++++++++++++++++---- src/ecom/grib_info/yaml_rules_mod.F90 | 2 +- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/ecom/CMakeLists.txt b/src/ecom/CMakeLists.txt index 114e164a4..5eca8e1fd 100644 --- a/src/ecom/CMakeLists.txt +++ b/src/ecom/CMakeLists.txt @@ -48,14 +48,43 @@ execute_process( OUTPUT_STRIP_TRAILING_WHITESPACE ) + +# Path to the configured file +set(ECOM_VERSION_FILE ${CMAKE_CURRENT_BINARY_DIR}/output_manager_version_mod.F90) + +# Remove the file if it exists +if(EXISTS ${ECOM_VERSION_FILE}) + file(REMOVE ${ECOM_VERSION_FILE}) +endif() + +# Generate the file +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/output_manager_version_mod.F90.in + ${ECOM_VERSION_FILE} +) + + + + +# Define the include directory path +set(ECOM_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include) + +# Clean the directory if it exists +if(EXISTS ${ECOM_INCLUDE_DIR}) + file(REMOVE_RECURSE ${ECOM_INCLUDE_DIR}) +endif() + +# Create the directory +file(MAKE_DIRECTORY ${ECOM_INCLUDE_DIR}) + + # # + CONFIGURE HEADERS # ====================================================================== -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/output_manager_version_mod.F90.in ${CMAKE_CURRENT_BINARY_DIR}/output_manager_version_mod.F90 ) -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/include/standard/output_manager_preprocessor_utils.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/output_manager_preprocessor_utils.h ) -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/include/standard/output_manager_preprocessor_trace_utils.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/output_manager_preprocessor_trace_utils.h ) -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/include/standard/output_manager_preprocessor_logging_utils.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/output_manager_preprocessor_logging_utils.h ) -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/include/standard/output_manager_preprocessor_errhdl_utils.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/output_manager_preprocessor_errhdl_utils.h ) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/include/standard/output_manager_preprocessor_utils.h.in ${ECOM_INCLUDE_DIR}/output_manager_preprocessor_utils.h ) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/include/standard/output_manager_preprocessor_trace_utils.h.in ${ECOM_INCLUDE_DIR}/output_manager_preprocessor_trace_utils.h ) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/include/standard/output_manager_preprocessor_logging_utils.h.in ${ECOM_INCLUDE_DIR}/output_manager_preprocessor_logging_utils.h ) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/include/standard/output_manager_preprocessor_errhdl_utils.h.in ${ECOM_INCLUDE_DIR}/output_manager_preprocessor_errhdl_utils.h ) # @@ -72,7 +101,7 @@ set( OUTPUT_MANAGER_LIBRARIES # + BUILD OUTPUT MANAGER CORE (this organisation comes from dep. problems in CMake) # ====================================================================== list( APPEND output_manager_src - ${CMAKE_CURRENT_BINARY_DIR}/output_manager_version_mod.F90 + ${ECOM_VERSION_FILE} core/om_data_kind_mod.F90 core/om_data_types_mod.F90 core/om_constants_mod.F90 diff --git a/src/ecom/grib_info/yaml_rules_mod.F90 b/src/ecom/grib_info/yaml_rules_mod.F90 index baa804f76..94f123c92 100644 --- a/src/ecom/grib_info/yaml_rules_mod.F90 +++ b/src/ecom/grib_info/yaml_rules_mod.F90 @@ -1216,7 +1216,7 @@ SUBROUTINE READ_ENCODE_OPTIONS( CFG, ENCODE_OPTIONS, VERBOSE ) WRITE(ERROR_UNIT,*) 'direct To FDB: ', ENCODE_OPTIONS%DIRECT_TO_FDB ENDIF ELSE - ENCODE_OPTIONS%PACKING_TYPE = .FALSE. + ENCODE_OPTIONS%DIRECT_TO_FDB = .FALSE. ENDIF ! Trace end of procedure (on success)