File tree 3 files changed +18
-1
lines changed
3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ if( NOT ECWAM_PROJECT_NAME )
19
19
set ( ECWAM_PROJECT_NAME ecwam )
20
20
endif ()
21
21
22
+ string ( TOUPPER ${ECWAM_PROJECT_NAME} PNAME )
23
+ set ( ${PNAME} _ECBUILD_COMPILE_FLAGS ${CMAKE_CURRENT_SOURCE_DIR} /cmake/ecwam_init_flags.cmake CACHE FILEPATH "" )
22
24
project ( ${ECWAM_PROJECT_NAME} LANGUAGES Fortran C CXX )
23
25
24
26
include ( ecwam_macros )
Original file line number Diff line number Diff line change 6
6
# granted to it by virtue of its status as an intergovernmental organisation
7
7
# nor does it submit to any jurisdiction.
8
8
9
+ # Capture ecbuild defaults and/or flags set by a toolchain
10
+ set ( ${PNAME} _Fortran_FLAGS ${ECBUILD_Fortran_FLAGS} )
11
+ set ( ${PNAME} _Fortran_FLAGS_BIT ${ECBUILD_Fortran_FLAGS_BIT} )
12
+ set ( ${PNAME} _Fortran_FLAGS_DEBUG ${ECBUILD_Fortran_FLAGS_DEBUG} )
13
+
9
14
if (CMAKE_Fortran_COMPILER_ID MATCHES "Cray" )
10
15
set (autopromote_flags "-sreal64" )
11
16
set (checkbounds_flags "-Rb" )
@@ -44,7 +49,8 @@ if( NOT HAVE_SINGLE_PRECISION )
44
49
ecbuild_add_fortran_flags( "${autopromote_flags} " NAME autopromote )
45
50
endif ()
46
51
if ( DEFINED vectorization_flags )
47
- ecbuild_add_fortran_flags( "${vectorization_flags} " NAME vectorization )
52
+ # vectorization flags must be per-sourcefile overrideable, so are set via ${PNAME}_Fortran_FLAGS
53
+ set ( ${PNAME} _Fortran_FLAGS_BIT "${${PNAME} _Fortran_FLAGS_BIT} ${vectorization_flags} " )
48
54
endif ()
49
55
if ( DEFINED fpmodel_flags )
50
56
ecbuild_add_fortran_flags( "${fpmodel_flags} " NAME fpmodel )
Original file line number Diff line number Diff line change
1
+ # (C) Copyright 2022- ECMWF.
2
+ #
3
+ # This software is licensed under the terms of the Apache Licence Version 2.0
4
+ # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5
+ # In applying this licence, ECMWF does not waive the privileges and immunities
6
+ # granted to it by virtue of its status as an intergovernmental organisation
7
+ # nor does it submit to any jurisdiction.
8
+
9
+ # Empty file to trigger ecbuild to use ${PNAME}_<LANG>_FLAGS
You can’t perform that action at this time.
0 commit comments