From 570e6b2a8085540a9f5634e1a31d2e42e769f82f Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 9 Dec 2019 04:30:06 +0300 Subject: cmake-common: use C++17 --- .appveyor/build.ps1 | 1 + .travis/build.sh | 1 + CMakeLists.txt | 2 +- client/Dockerfile | 3 ++- server/Dockerfile | 3 ++- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.appveyor/build.ps1 b/.appveyor/build.ps1 index ea80b10..20e67c4 100644 --- a/.appveyor/build.ps1 +++ b/.appveyor/build.ps1 @@ -97,6 +97,7 @@ function Build-Project { -G $Generator -A $Platform ` -D "BOOST_ROOT=$BoostDir" ` -D "BOOST_LIBRARYDIR=$BoostLibraryDir" ` + -D CC_CXX_STANDARD=17 ` -D ENABLE_TESTS=ON ` $ProjectDir } diff --git a/.travis/build.sh b/.travis/build.sh index 5c86ac0..0e36ca2 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -16,6 +16,7 @@ main() { -D "CMAKE_CXX_STANDARD_LIBRARIES=-lpthread" \ -D "BOOST_ROOT=$boost_dir" \ -D "BOOST_LIBRARYDIR=$boost_librarydir" \ + -D CC_CXX_STANDARD=17 \ -D ENABLE_TESTS=ON \ "$TRAVIS_BUILD_DIR" cmake --build . -- -j diff --git a/CMakeLists.txt b/CMakeLists.txt index b42e3f9..11ee856 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.8) project(math_server CXX) diff --git a/client/Dockerfile b/client/Dockerfile index 96da607..7980841 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -22,8 +22,9 @@ WORKDIR /tmp/build RUN cmake -G "Unix Makefiles" \ -D CMAKE_BUILD_TYPE=RelWithDebInfo \ - -D ENABLE_TESTS=ON \ -D CMAKE_CXX_STANDARD_LIBRARIES="-lpthread" \ + -D ENABLE_TESTS=ON \ + -D CC_CXX_STANDARD=17 \ /tmp/src && \ cmake --build test && \ ./test/unit_tests/unit_tests --log_level=all && \ diff --git a/server/Dockerfile b/server/Dockerfile index 7169a50..dd81c4d 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -22,8 +22,9 @@ WORKDIR /tmp/build RUN cmake -G "Unix Makefiles" \ -D CMAKE_BUILD_TYPE=Release \ - -D ENABLE_TESTS=ON \ -D CMAKE_CXX_STANDARD_LIBRARIES="-lpthread" \ + -D ENABLE_TESTS=ON \ + -D CC_CXX_STANDARD=17 \ /tmp/src && \ cmake --build test && \ ./test/unit_tests/unit_tests --log_level=all && \ -- cgit v1.2.3