Commit 4cb92b80 authored by Johan Ouwerkerk's avatar Johan Ouwerkerk

Enable C++17, and use 'standard' CMake features for doing so.

parent 03eff09a
Pipeline #7618 failed with stage
in 14 minutes and 15 seconds
project(otpclient)
cmake_minimum_required(VERSION 2.8.12)
#
# Need 3.10.3 for C++17 support enabled via CMake: https://cmake.org/cmake/help/v3.10/prop_tgt/CXX_STANDARD.html#prop_tgt:CXX_STANDARD
#
cmake_minimum_required(VERSION 3.10.3)
set(KF5_MIN_VERSION "5.18.0")
set(QT_MIN_VERSION "5.5.0")
......@@ -26,18 +30,15 @@ include(KDECMakeSettings)
include(ECMPoQmTools)
include(KDECompilerSettings NO_POLICY_SCOPE)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
################# Find dependencies #################
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Svg QuickControls2)
find_package(LibOath REQUIRED)
find_package(KF5Kirigami2 ${KF5_MIN_VERSION})
################# Enable C++11 features for clang and gcc #################
if(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++0x")
endif()
################# build and install #################
add_subdirectory(src)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment