From 8954e627395a514f3be2ce8d92334687de07557b Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 1 Aug 2022 21:38:23 +0100 Subject: [PATCH] Cray compiler: Enable ISO C++ 2011 standard --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index df0920c04..5b0d5c5ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,9 @@ ecbuild_add_option( FEATURE EXPERIMENTAL_BUILD_WITH_CXX DEFAULT OFF ) if( HAVE_EXPERIMENTAL_BUILD_WITH_CXX ) enable_language( CXX ) + if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Cray" ) + set(CMAKE_CXX_FLAGS "-hstd=c++11 ${CMAKE_CXX_FLAGS}") + endif() endif() ecbuild_add_option( FEATURE PRODUCT_GRIB