update build

This commit is contained in:
Neargye 2018-04-30 08:00:05 +05:00
parent 908126e420
commit 4a0aeab559
3 changed files with 137 additions and 19 deletions

View file

@ -1,13 +1,12 @@
version: "{branch} #{build}" version: "{branch} #{build}"
image: Visual Studio 2017 image:
- Visual Studio 2017
platform: platform:
- x64 - x64
- x32
configuration: configuration:
- Release
- Debug - Debug
shallow_clone: true shallow_clone: true
@ -17,14 +16,16 @@ matrix:
environment: environment:
matrix: matrix:
- TOOLCHAIN: msvc14 - GENERATOR: "Visual Studio 15 2017 Win64"
- TOOLCHAIN: msvc15 - GENERATOR: "Visual Studio 15 2017"
- GENERATOR: "Visual Studio 14 2015 Win64"
- GENERATOR: "Visual Studio 14 2015"
before_build: before_build:
- if exist build RMDIR /S /Q build - if exist build RMDIR /S /Q build
- if not exist build mkdir build - if not exist build mkdir build
- cd build - cd build
- cmake .. %CMAKE_CONFIGURE_FLAGS% - cmake .. -G "%GENERATOR%"
build_script: build_script:
- cmake --build . --config %CONFIGURATION% - cmake --build . --config %CONFIGURATION%

View file

@ -10,25 +10,137 @@ git:
matrix: matrix:
fast_finish: true fast_finish: true
os: matrix:
- linux include:
- osx - os: linux
compiler: g++
env:
- CXX_COMPILER=g++-4.8 CC_COMPILER=gcc-4.8 CONFIGURATION=Debug
compiler: - os: linux
- g++ compiler: g++
- clang++ addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
env:
- CXX_COMPILER=g++-4.9 CC_COMPILER=gcc-4.9 CONFIGURATION=Debug
env: - os: linux
- PLATFORM=x64 CONFIGURATION=Release compiler: g++
- PLATFORM=x64 CONFIGURATION=Debug addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- CXX_COMPILER=g++-5 CC_COMPILER=gcc-5 CONFIGURATION=Debug
- os: linux
compiler: g++
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- CXX_COMPILER=g++-6 CC_COMPILER=gcc-6 CONFIGURATION=Debug
- os: linux
compiler: g++
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- CXX_COMPILER=g++-7 CC_COMPILER=gcc-7 CONFIGURATION=Debug
- os: linux
compiler: clang++
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
env:
- CXX_COMPILER=clang++-4.0 CC_COMPILER=clang-4.0 CONFIGURATION=Debug
- os: linux
compiler: clang++
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
env:
- CXX_COMPILER=clang++-5.0 CC_COMPILER=clang-5.0 CONFIGURATION=Debug
- os: linux
compiler: clang++
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
packages:
- clang-6.0
env:
- CXX_COMPILER=clang++-6.0 CC_COMPILER=clang-6.0 CONFIGURATION=Debug
- os: osx
compiler: clang++
osx_image: xcode8.3
env:
- CONFIGURATION=Debug
- os: osx
compiler: clang++
osx_image: xcode9.0
env:
- CONFIGURATION=Debug
- os: osx
compiler: clang++
osx_image: xcode9.1
env:
- CONFIGURATION=Debug
- os: osx
compiler: clang++
osx_image: xcode9.2
env:
- CONFIGURATION=Debug
- os: osx
compiler: clang++
osx_image: xcode9.3
env:
- CONFIGURATION=Debug
install:
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
export CXX=${CXX_COMPILER}
export CC=${CC_COMPILER}
fi
script: script:
- rm -rf build - rm -rf build
- mkdir -p build - mkdir -p build
- cd build - cd build
- cmake .. -DCMAKE_BUILD_TYPE=$CONFIGURATION -DTARGET_CPU=$PLATFORM - cmake .. -DCMAKE_BUILD_TYPE=${CONFIGURATION}
- cmake --build . --config $CONFIGURATION - cmake --build . --config ${CONFIGURATION}
- ctest -V --output-on-failure -С $CONFIGURATION - ctest -V --output-on-failure -С ${CONFIGURATION}
notifications: notifications:
email: false email: false

View file

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.2) cmake_minimum_required(VERSION 3.2)
include(CheckCXXCompilerFlag)
project(nameof) project(nameof)
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)
@ -8,7 +9,11 @@ set(CMAKE_CXX_EXTENSIONS OFF)
if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
add_compile_options(-Wall -Wextra -pedantic) add_compile_options(-Wall -Wextra -pedantic)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
add_compile_options(/W4 /permissive-) add_compile_options(/W4)
check_cxx_compiler_flag(/permissive HAS_PERMISSIVE_FLAG)
if(HAS_PERMISSIVE_FLAG)
add_compile_options(/permissive-)
endif()
endif() endif()
add_subdirectory(example) add_subdirectory(example)