--- CMakeLists.txt.orig 2017-01-24 21:36:21 UTC +++ CMakeLists.txt @@ -25,7 +25,11 @@ if (NOT DEFINED CMAKE_CONFIGURATION_TYPES AND NOT CMAK set (CMAKE_BUILD_TYPE "${default}" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE) endif () -# C++14 support, warnings and other flags +# C++17 support, warnings and other flags +# +# 17 is needed for std::optional, in qxmpp +set (CMAKE_CXX_STANDARD 17) +set (CMAKE_CXX_STANDARD_REQUIRED ON) set (DEFINITIONS QT_NO_CAST_TO_ASCII QT_DISABLE_DEPRECATED_BEFORE=0x040900) list (APPEND DEFINITIONS KADU_EXPORT_TESTS) @@ -38,7 +42,6 @@ else () set (COMMON_COMPILE_FLAGS "-Wall -Wextra -Wundef -Wunused -Wuninitialized -Wcast-align -Wpointer-arith -fno-common") set (C_FLAGS "-Wwrite-strings") set (CXX_FLAGS "-Woverloaded-virtual -Wnon-virtual-dtor ${CXX_FLAGS}") - set (CMAKE_CXX_STANDARD 14) if (NOT WIN32) set (COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -fvisibility=hidden")