diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cd0264b72..49c09c1035 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,11 @@ if ( DEFINED CMAKE_TOOLCHAIN_FILE ) # include( ${WRF_CONFIG} ) endif() +# Import default flags now, get rid of any imported release flag +# we will handle that ourselves with WRF_FCOPTIM/WRF_FCNOOPT +set( CMAKE_Fortran_FLAGS_RELEASE "" CACHE STRING "" FORCE ) +set( CMAKE_C_FLAGS_RELEASE "" CACHE STRING "" FORCE ) + # list( APPEND CMAKE_MODULE_PATH ) list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/ ${PROJECT_SOURCE_DIR}/cmake/modules ) diff --git a/cmake/template/arch_config.cmake b/cmake/template/arch_config.cmake index 0a655a4e32..7780034c30 100644 --- a/cmake/template/arch_config.cmake +++ b/cmake/template/arch_config.cmake @@ -15,10 +15,10 @@ set( CMAKE_Fortran_FLAGS_INIT "{SFC_FLAGS} {FCBASEOPTS} {BYTESWAPIO}" ) set( CMAKE_C_FLAGS_INIT "{SCC_FLAGS} {CFLAGS_LOCAL}" ) # https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS_CONFIG_INIT.html -set( CMAKE_Fortran_FLAGS_Debug_INIT "{FCDEBUG}" ) -set( CMAKE_Fortran_FLAGS_Release_INIT "" ) -set( CMAKE_C_FLAGS_Debug_INIT "" ) -set( CMAKE_C_FLAGS_Release_INIT "" ) +set( CMAKE_Fortran_FLAGS_DEBUG_INIT "{FCDEBUG}" ) +set( CMAKE_Fortran_FLAGS_RELEASE_INIT "" ) +set( CMAKE_C_FLAGS_DEBUG_INIT "" ) +set( CMAKE_C_FLAGS_RELEASE_INIT "" ) # Project specifics now set( WRF_MPI_Fortran_FLAGS "{DM_FC_FLAGS}" ) diff --git a/frame/CMakeLists.txt b/frame/CMakeLists.txt index 4543c4694e..dde702bcf6 100644 --- a/frame/CMakeLists.txt +++ b/frame/CMakeLists.txt @@ -155,6 +155,8 @@ target_sources( # Disable optimizations on these files always set_source_files_properties( ${nl_dyn_source} + module_comm_nesting_dm.F + DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTIES COMPILE_OPTIONS_OPTIMIZATION $<$:${WRF_FCNOOPT}>