Update CXX_STANDARD to C++17 and minimum required cmake version to 3.11

This commit is contained in:
Dawid Drozd 2019-06-30 14:14:43 +02:00
parent 02b45437b6
commit 7e6bb32e27
3 changed files with 7 additions and 9 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
# Layout of project is inspired by: https://youtu.be/6sWec7b0JIc?t=20m50s
# This top level CMakeLists should be used for development
@ -8,7 +8,7 @@ project(EventBusDev)
option(ENABLE_TEST "Enable test" ON)
option(ENABLE_PERFORMANCE "Enable performance subproject" OFF)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
add_subdirectory(lib/)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
# Use ';' to specify multiple e.g. ZIP;TGZ;DEB
set(CPACK_GENERATOR "" CACHE STRING "Set packages CPack should build e.g. ZIP;TGZ;DEB")
@ -9,7 +9,7 @@ project(EventBus
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
# Dependencies
# No dependencies for EventBus yay!

View File

@ -1,17 +1,15 @@
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
# http://www.levelofindirection.com/journal/2010/12/28/unit-testing-in-c-and-objective-c-just-got-easier.html
# Thanks for CATCH!
project(EventBusTest)
set(CMAKE_CXX_STANDARD 14)
# Dependencies
enable_testing()
if (NOT TARGET Dexode::EventBus)
if(NOT TARGET Dexode::EventBus)
find_package(EventBus CONFIG REQUIRED)
endif ()
endif()
find_package(Catch2 2.6 REQUIRED)
find_package(Threads REQUIRED)