Skip to content

Commit

Permalink
Move ocean_prec checks to after HAVE_SINGLE_PRECISION has been initia…
Browse files Browse the repository at this point in the history
…lised (#14)
  • Loading branch information
awnawab authored Apr 9, 2024
1 parent dd11e32 commit b689178
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ project( ${ECWAM_PROJECT_NAME} LANGUAGES Fortran C CXX )
include( ecwam_macros )
ecbuild_enable_fortran( REQUIRED NO_MODULE_DIRECTORY )

### Determine ocean model precision
if( NOT DEFINED OCEAN_PREC )
if( HAVE_SINGLE_PRECISION )
set(OCEAN_PREC SP)
else()
set(OCEAN_PREC DP)
endif()
endif()
string( TOLOWER "${OCEAN_PREC}" ocean_prec )

### Dependencies

ecbuild_find_package( fiat REQUIRED )
Expand Down Expand Up @@ -64,6 +54,16 @@ ecbuild_add_option( FEATURE UNWAM
DEFAULT OFF
DESCRIPTION "Support for UNWAM" )

### Determine ocean model precision
if( NOT DEFINED OCEAN_PREC )
if( HAVE_SINGLE_PRECISION )
set(OCEAN_PREC SP)
else()
set(OCEAN_PREC DP)
endif()
endif()
string( TOLOWER "${OCEAN_PREC}" ocean_prec )

ecbuild_add_option( FEATURE OCEAN_COUPLING
DEFAULT ON
DESCRIPTION "Support ocean coupling"
Expand Down

0 comments on commit b689178

Please sign in to comment.