From 4ff45ee540b571482bf57c546f56c4314d3c925f Mon Sep 17 00:00:00 2001 From: ArthurSonzogni Date: Sun, 22 Mar 2020 21:01:44 +0100 Subject: [PATCH] Add travis configuration. --- .travis.yml | 33 +++++++++++++++++++++++++++++++ CMakeLists.txt | 2 +- examples/component/CMakeLists.txt | 1 + examples/dom/CMakeLists.txt | 1 + examples/util/CMakeLists.txt | 1 + 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..198ef41 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,33 @@ +sudo: false + +language: + - cpp + +script: + - mkdir build + - cd build + - cmake .. + - cmake --build . + +notifications: + email: false + +jobs: + include: + # ubuntu 16.04, gcc-9 + - os: linux + compiler: gcc + addons: { apt: { packages: ["g++-9", "ninja-build"], + sources: ["ubuntu-toolchain-r-test"] } } + + # ubuntu 16.04, clang-8 + - os: linux + compiler: clang + addons: { apt: { packages: ["clang-8", "ninja-build"], + sources: ["llvm-toolchain-xenial-8"] } } + + # OS X High Sierra 10.13 + - os: osx + + # Windows + - os: windows diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cd4f95..1948157 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,7 @@ foreach(lib screen dom component) $ PRIVATE src ) - target_compile_features(${lib} PUBLIC cxx_std_17) + set_property(TARGET ${lib} PROPERTY CXX_STANDARD 17) target_compile_options(${lib} PRIVATE -Wall -Werror -pedantic -Wextra -Wno-sign-compare) endforeach() diff --git a/examples/component/CMakeLists.txt b/examples/component/CMakeLists.txt index 41f0435..0b41a2f 100644 --- a/examples/component/CMakeLists.txt +++ b/examples/component/CMakeLists.txt @@ -1,6 +1,7 @@ function(example name) add_executable(${name} ${name}.cpp) target_link_libraries(${name} PUBLIC component) + set_property(TARGET ${name} PROPERTY CXX_STANDARD 17) endfunction(example) example(checkbox) diff --git a/examples/dom/CMakeLists.txt b/examples/dom/CMakeLists.txt index 422adfe..0a08c51 100644 --- a/examples/dom/CMakeLists.txt +++ b/examples/dom/CMakeLists.txt @@ -1,6 +1,7 @@ function(example name) add_executable(${name} ${name}.cpp) target_link_libraries(${name} PUBLIC dom) + set_property(TARGET ${name} PROPERTY CXX_STANDARD 17) endfunction(example) example(dbox) diff --git a/examples/util/CMakeLists.txt b/examples/util/CMakeLists.txt index 7b2db4f..ee10806 100644 --- a/examples/util/CMakeLists.txt +++ b/examples/util/CMakeLists.txt @@ -1,6 +1,7 @@ function(example name) add_executable(${name} ${name}.cpp) target_link_libraries(${name} PUBLIC component) + set_property(TARGET ${name} PROPERTY CXX_STANDARD 17) endfunction(example) example(print_key_press)