Add travis configuration.

This commit is contained in:
ArthurSonzogni 2020-03-22 21:01:44 +01:00
parent 1e35687d64
commit 4ff45ee540
5 changed files with 37 additions and 1 deletions

33
.travis.yml Normal file
View File

@ -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

View File

@ -74,7 +74,7 @@ foreach(lib screen dom component)
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
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()

View File

@ -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)

View File

@ -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)

View File

@ -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)