From da0e37eb31ed750d5491f8aafbd37022e218dd14 Mon Sep 17 00:00:00 2001 From: Anil Tuncel Date: Tue, 17 Oct 2023 11:24:35 +0200 Subject: [PATCH] Set C++17 standard --- .github/workflows/test.yml | 4 ++++ efel/cppcore/CMakeLists.txt | 15 +++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0bb76517..777f7b8d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,11 @@ jobs: - name: Run tox run: | + sudo apt update + sudo apt install g++-11 gcc-11 -y + g++ --version gcc --version + cmake --version tox # this does not call docs coverage: diff --git a/efel/cppcore/CMakeLists.txt b/efel/cppcore/CMakeLists.txt index 3803c306..64baf482 100644 --- a/efel/cppcore/CMakeLists.txt +++ b/efel/cppcore/CMakeLists.txt @@ -15,16 +15,23 @@ # along with this library; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.12) + +# Set Compiler +set(CMAKE_C_COMPILER g++) +set(CMAKE_CXX_COMPILER g++) + + +# Set C++ standard +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) -set(CMAKE_BUILD_TYPE Debug) set(FEATURESRCS Utils.cpp LibV1.cpp LibV2.cpp LibV3.cpp LibV5.cpp FillFptrTable.cpp DependencyTree.cpp efel.cpp cfeature.cpp mapoperations.cpp) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - add_library(efelStatic ${FEATURESRCS}) set_target_properties(efelStatic PROPERTIES OUTPUT_NAME efel) install(TARGETS efelStatic ARCHIVE DESTINATION lib)