Skip to content

Commit 9465388

Browse files
committed
Trigger the use of overrideable flags after initialising project
1 parent 5b87f5f commit 9465388

File tree

5 files changed

+9
-17
lines changed

5 files changed

+9
-17
lines changed

Diff for: .github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ jobs:
178178
cache_suffix: "${{ matrix.build_type }}-${{ env.CACHE_SUFFIX }}"
179179
recreate_cache: ${{ matrix.caching == false }}
180180
dependencies: |
181-
ecmwf/ecbuild
181+
awnawab/ecbuild@feature/purge-compiler-flags
182182
ecmwf/eccodes
183183
ecmwf/fckit@refs/tags/0.13.0
184184
ecmwf-ifs/fiat@refs/tags/1.4.1

Diff for: CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ if( NOT ECWAM_PROJECT_NAME )
2020
endif()
2121

2222
string( TOUPPER ${ECWAM_PROJECT_NAME} PNAME )
23-
set( ${PNAME}_ECBUILD_COMPILE_FLAGS ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ecwam_init_flags.cmake CACHE FILEPATH "")
2423
project( ${ECWAM_PROJECT_NAME} LANGUAGES Fortran C CXX )
2524

2625
include( ecwam_macros )

Diff for: cmake/ecwam_compile_flags.cmake

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
# granted to it by virtue of its status as an intergovernmental organisation
77
# nor does it submit to any jurisdiction.
88

9-
# Capture ecbuild defaults and/or flags set by a toolchain
10-
set( ${PNAME}_Fortran_FLAGS "${${PNAME}_Fortran_FLAGS} ${ECBUILD_Fortran_FLAGS}" )
11-
set( ${PNAME}_Fortran_FLAGS_BIT "${${PNAME}_Fortran_FLAGS_BIT} ${ECBUILD_Fortran_FLAGS_BIT}" )
12-
set( ${PNAME}_Fortran_FLAGS_DEBUG "${${PNAME}_Fortran_FLAGS_DEBUG} ${ECBUILD_Fortran_FLAGS_DEBUG}" )
9+
# Trigger the use of <PNAME>_LANG_FLAGS in ecbuild
10+
ecbuild_init_overrideable_compiler_flags(
11+
LANGUAGES Fortran
12+
CAPTURE_BUNDLE_FLAGS
13+
COMPILE_FLAGS ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ecwam_compile_flags.cmake
14+
)
1315

1416
if(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
1517
set(autopromote_flags "-sreal64")

Diff for: cmake/ecwam_init_flags.cmake

-9
This file was deleted.

Diff for: package/bundle/bundle.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ cmake : CMAKE_LINK_DEPENDS_NO_SHARED=ON
1313
projects :
1414

1515
- ecbuild :
16-
git : https://github.com/ecmwf/ecbuild
17-
version : master
16+
git : https://github.com/awnawab/ecbuild.git
17+
version : feature/purge-compiler-flags
1818
bundle : false
1919

2020
- eccodes :

0 commit comments

Comments
 (0)