From 8b422b3d9f73cc8c99ba05d603a236dbd44fa5e9 Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Sat, 25 May 2019 01:49:29 +0700 Subject: [PATCH] add cpp17 build flags, remove old compilers from CI --- .appveyor.yml | 1 + .travis.yml | 50 ++++------------------ CMakeLists.txt | 2 +- untests/sources/untests_high/component.cpp | 32 -------------- untests/sources/untests_high/node.cpp | 1 - 5 files changed, 10 insertions(+), 76 deletions(-) delete mode 100644 untests/sources/untests_high/component.cpp diff --git a/.appveyor.yml b/.appveyor.yml index df304d8e..5bbd05c4 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,6 +2,7 @@ version: "{build}" image: - Visual Studio 2015 - Visual Studio 2017 + - Visual Studio 2019 Preview platform: - Win32 - x64 diff --git a/.travis.yml b/.travis.yml index 069a68a0..1c5f531e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,6 @@ language: cpp matrix: include: - - os: linux - dist: trusty - addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-4.9"] } } - env: MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9" - - os: linux - dist: trusty - addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-5"] } } - env: MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" - - os: linux - dist: trusty - addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-6"] } } - env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" - os: linux dist: trusty addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-7"] } } @@ -21,18 +9,6 @@ matrix: dist: trusty addons: { apt: { sources: ubuntu-toolchain-r-test, packages: ["xorg-dev", "g++-8"] } } env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" - - os: linux - dist: trusty - addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"], packages: ["xorg-dev", "clang-3.8", "g++-5"] } } - env: MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8" - - os: linux - dist: trusty - addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.9"], packages: ["xorg-dev", "clang-3.9", "g++-5"] } } - env: MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9" - - os: linux - dist: trusty - addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-4.0"], packages: ["xorg-dev", "clang-4.0", "g++-5"] } } - env: MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0" - os: linux dist: trusty addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"], packages: ["xorg-dev", "clang-5.0", "g++-7"] } } @@ -41,24 +17,14 @@ matrix: dist: trusty addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-6.0"], packages: ["xorg-dev", "clang-6.0", "g++-7"] } } env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0" - - os: osx - osx_image: xcode8.3 - compiler: clang - - os: osx - osx_image: xcode9 - compiler: clang - - os: osx - osx_image: xcode9.1 - compiler: clang - - os: osx - osx_image: xcode9.2 - compiler: clang - - os: osx - osx_image: xcode9.3 - compiler: clang - - os: osx - osx_image: xcode9.4 - compiler: clang + - os: linux + dist: trusty + addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-7"], packages: ["xorg-dev", "clang-7", "g++-7"] } } + env: MATRIX_EVAL="CC=clang-7 && CXX=clang++-7" + - os: linux + dist: trusty + addons: { apt: { sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-8"], packages: ["xorg-dev", "clang-8", "g++-7"] } } + env: MATRIX_EVAL="CC=clang-8 && CXX=clang++-8" - os: osx osx_image: xcode10 compiler: clang diff --git a/CMakeLists.txt b/CMakeLists.txt index 954cd1d5..526f4852 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,7 +142,7 @@ target_compile_options(${PROJECT_NAME} -Wno-deprecated-declarations>) target_compile_features(${PROJECT_NAME} - PUBLIC cxx_std_14) + PUBLIC cxx_std_17) target_compile_definitions(${PROJECT_NAME} PUBLIC diff --git a/untests/sources/untests_high/component.cpp b/untests/sources/untests_high/component.cpp deleted file mode 100644 index c6db5cb1..00000000 --- a/untests/sources/untests_high/component.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * This file is part of the "Enduro2D" - * For conditions of distribution and use, see copyright notice in LICENSE.md - * Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) - ******************************************************************************/ - -#include "_high.hpp" -using namespace e2d; - -namespace -{ - class safe_starter_initializer final : private noncopyable { - public: - safe_starter_initializer() { - modules::initialize(0, nullptr, - starter::parameters( - engine::parameters("component_untests", "enduro2d") - .without_graphics(true))); - } - - ~safe_starter_initializer() noexcept { - modules::shutdown(); - } - }; -} - -TEST_CASE("component") { - safe_starter_initializer initializer; - library& l = the(); - { - } -} diff --git a/untests/sources/untests_high/node.cpp b/untests/sources/untests_high/node.cpp index 94cd8dbb..646e74ea 100644 --- a/untests/sources/untests_high/node.cpp +++ b/untests/sources/untests_high/node.cpp @@ -63,7 +63,6 @@ namespace TEST_CASE("node") { safe_starter_initializer initializer; - world& w = the(); SECTION("empty_node") { auto n = node::create(); REQUIRE(n);