ECC-1508: Set project language to be C++

This commit is contained in:
Shahram Najm 2023-01-30 11:24:39 +00:00
parent 8b2bd338c1
commit 81a2fc9d99
7 changed files with 14 additions and 11 deletions

View File

@ -22,6 +22,9 @@ find_package( ecbuild 3.7 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CUR
# Initialise project
project( eccodes VERSION 2.29.0 LANGUAGES CXX )
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
###############################################################################
# system checks needed for eccodes_config.h and some options like MEMFS
@ -68,7 +71,7 @@ ecbuild_info("Operating system=${CMAKE_SYSTEM} (${EC_OS_BITS} bits)")
if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
ecbuild_add_cxx_flags("-Wno-write-strings -Wno-deprecated")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
ecbuild_add_cxx_flags("-Wno-deprecated")
ecbuild_add_cxx_flags("-Wno-write-strings -Wno-deprecated")
elseif( CMAKE_CXX_COMPILER_ID STREQUAL "Cray" )
set(CMAKE_CXX_FLAGS "-hstd=c++11 ${CMAKE_CXX_FLAGS}")
endif()

View File

@ -45,8 +45,8 @@ You can also pass options to the cmake command above. Some typical examples are:
-DENABLE_ECCODES_THREADS=ON Enable POSIX threads
-DENABLE_JPG=ON Enable JPEG encoding/decoding (for GRIB packing)
-DCMAKE_Fortran_COMPILER=pgf90 Set Fortran compiler to Portland Group F90 compiler
-DCMAKE_C_FLAGS="-O2 -Wall" Prepend the specified flags at the front
of the compilation command for C source files
-DCMAKE_CXX_FLAGS="-O2 -Wall" Prepend the specified flags at the front
of the compilation command for C++ source files
By default the ctest step above does NOT require any data to be downloaded and only runs basic sanity tests.
However if you wish to exercise more of the functionality of ecCodes, you are advised to configure the build with:

View File

@ -32,7 +32,7 @@ list(APPEND test_c_bins
grib_optimize_scaling_sh
grib_set_force
grib_ecc-386
# grib_ecc-1431
grib_ecc-1431
bufr_ecc-517
bufr_ecc-1288
bufr_get_element
@ -271,9 +271,9 @@ if( HAVE_BUILD_TOOLS )
codes_split_file
grib_mars_keys)
#if( HAVE_AEC AND ENABLE_EXTRA_TESTS )
# list(APPEND tests_extra grib_ecc-1431)
#endif()
if( HAVE_AEC AND ENABLE_EXTRA_TESTS )
list(APPEND tests_extra grib_ecc-1431)
endif()
if( HAVE_FORTRAN AND ENABLE_EXTRA_TESTS )
list(APPEND tests_extra bufr_dump_encode_fortran)
list(APPEND tests_extra bufr_dump_decode_fortran)

View File

@ -9,7 +9,7 @@
*/
/*
* C Implementation: big2gribex
* Implementation: big2gribex
*
* Description:
*

View File

@ -9,7 +9,7 @@
*/
/*
* C Implementation: gts_dump
* Implementation: gts_dump
*
*
*/

View File

@ -9,7 +9,7 @@
*/
/*
* C Implementation: grib_dump
* Implementation: grib_dump
*
* Author: Enrico Fucile
*

View File

@ -9,7 +9,7 @@
*/
/*
* C Implementation: grib_ls
* Implementation: grib_ls
*
* Author: Enrico Fucile <enrico.fucile@ecmwf.int>
*