update build
This commit is contained in:
parent
908126e420
commit
4a0aeab559
3 changed files with 137 additions and 19 deletions
|
@ -1,13 +1,12 @@
|
|||
version: "{branch} #{build}"
|
||||
|
||||
image: Visual Studio 2017
|
||||
image:
|
||||
- Visual Studio 2017
|
||||
|
||||
platform:
|
||||
- x64
|
||||
- x32
|
||||
|
||||
configuration:
|
||||
- Release
|
||||
- Debug
|
||||
|
||||
shallow_clone: true
|
||||
|
@ -17,14 +16,16 @@ matrix:
|
|||
|
||||
environment:
|
||||
matrix:
|
||||
- TOOLCHAIN: msvc14
|
||||
- TOOLCHAIN: msvc15
|
||||
- GENERATOR: "Visual Studio 15 2017 Win64"
|
||||
- GENERATOR: "Visual Studio 15 2017"
|
||||
- GENERATOR: "Visual Studio 14 2015 Win64"
|
||||
- GENERATOR: "Visual Studio 14 2015"
|
||||
|
||||
before_build:
|
||||
- if exist build RMDIR /S /Q build
|
||||
- if not exist build mkdir build
|
||||
- cd build
|
||||
- cmake .. %CMAKE_CONFIGURE_FLAGS%
|
||||
- cmake .. -G "%GENERATOR%"
|
||||
|
||||
build_script:
|
||||
- cmake --build . --config %CONFIGURATION%
|
||||
|
|
138
.travis.yml
138
.travis.yml
|
@ -10,25 +10,137 @@ git:
|
|||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
compiler:
|
||||
- g++
|
||||
- clang++
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
compiler: g++
|
||||
env:
|
||||
- PLATFORM=x64 CONFIGURATION=Release
|
||||
- PLATFORM=x64 CONFIGURATION=Debug
|
||||
- CXX_COMPILER=g++-4.8 CC_COMPILER=gcc-4.8 CONFIGURATION=Debug
|
||||
|
||||
- os: linux
|
||||
compiler: g++
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.9
|
||||
env:
|
||||
- CXX_COMPILER=g++-4.9 CC_COMPILER=gcc-4.9 CONFIGURATION=Debug
|
||||
|
||||
- os: linux
|
||||
compiler: g++
|
||||
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:
|
||||
- rm -rf build
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=$CONFIGURATION -DTARGET_CPU=$PLATFORM
|
||||
- cmake --build . --config $CONFIGURATION
|
||||
- ctest -V --output-on-failure -С $CONFIGURATION
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=${CONFIGURATION}
|
||||
- cmake --build . --config ${CONFIGURATION}
|
||||
- ctest -V --output-on-failure -С ${CONFIGURATION}
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.2)
|
||||
include(CheckCXXCompilerFlag)
|
||||
project(nameof)
|
||||
|
||||
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"))
|
||||
add_compile_options(-Wall -Wextra -pedantic)
|
||||
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()
|
||||
|
||||
add_subdirectory(example)
|
||||
|
|
Loading…
Reference in a new issue