From a23a3dea95c88dd7dc1889d4bbc65d13673cb99e Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Sat, 28 Jan 2023 19:43:30 +0000 Subject: [PATCH] ECC-1508: Set project language to be C++ --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 87e7930ac..5b4e2a1c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,7 +65,11 @@ ecbuild_info("Operating system=${CMAKE_SYSTEM} (${EC_OS_BITS} bits)") ############################################################################### # some variables/options of this project -if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Cray" ) +if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" ) + ecbuild_add_cxx_flags("-fpermissive -Wno-write-strings -Wno-deprecated -Werror=return-type") +elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + ecbuild_add_cxx_flags("-fpermissive -Wno-deprecated -Wno-c++11-compat-deprecated-writable-strings") +elseif( CMAKE_CXX_COMPILER_ID STREQUAL "Cray" ) set(CMAKE_CXX_FLAGS "-hstd=c++11 ${CMAKE_CXX_FLAGS}") endif()