change build settings

This commit is contained in:
terik23 2018-04-08 22:27:41 +05:00 committed by Neargye
parent 601ccc0f8a
commit 4f249313c8
4 changed files with 42 additions and 42 deletions

39
.appveyor.yml Normal file
View file

@ -0,0 +1,39 @@
version: "{branch} #{build}"
image: Visual Studio 2017
platform:
- x64
- x32
configuration:
- Release
- Debug
shallow_clone: true
matrix:
fast_finish: false
environment:
matrix:
- TOOLCHAIN: msvc14
- TOOLCHAIN: msvc15
init:
- ps: 'Write-Host "Building branch: $env:APPVEYOR_REPO_BRANCH" -ForegroundColor Magenta'
before_build:
- ps: 'Write-Host "Running CMake:" -ForegroundColor Magenta'
- if exist build RMDIR /S /Q build
- if not exist build mkdir build
- cd build
- cmake.exe .. %CMAKE_CONFIGURE_FLAGS%
build_script:
- ps: 'Write-Host "Running build:" -ForegroundColor Magenta'
- cmake --build . --config %CONFIGURATION%
test_script:
- ps: 'Write-Host "Running tests:" -ForegroundColor Magenta'
- ctest -V --output-on-failure -C %CONFIGURATION%

View file

@ -14,6 +14,7 @@ compiler:
env:
- PLATFORM=x64 CONFIGURATION=Release
- PLATFORM=x64 CONFIGURATION=Debug
script:
- rm -rf build

View file

@ -3,11 +3,12 @@ project(nameof)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
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)
add_compile_options(/W4 /permissive-)
endif()
add_subdirectory(example)

View file

@ -1,41 +0,0 @@
version: "{branch} #{build}"
image: Visual Studio 2017
platform: x64
configuration: Release
shallow_clone: true
matrix:
fast_finish: false
environment:
matrix:
- PLATFORM: x64
BUILDER: CMake
GENERATOR: "Visual Studio 15 2017 Win64"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- PLATFORM: x64
BUILDER: CMake
GENERATOR: "Visual Studio 14 2015 Win64"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
init:
- ps: 'Write-Host "Building GEOS branch: $env:APPVEYOR_REPO_BRANCH" -ForegroundColor Magenta'
before_build:
- ps: 'Write-Host "Running $env:BUILDER with $env:GENERATOR" -ForegroundColor Magenta'
- if exist build RMDIR /S /Q build
- if not exist build mkdir build
- cd build
- if "%BUILDER%"=="CMake" cmake.exe .. -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DTARGET_CPU=$PLATFORM
build_script:
- ps: 'Write-Host "Running $env:BUILDER:" -ForegroundColor Magenta'
- if "%BUILDER%"=="CMake" cmake --build . --config %CONFIGURATION%
test_script:
- ps: 'Write-Host "Running tests:" -ForegroundColor Magenta'
- if "%BUILDER%"=="CMake" ctest -V --output-on-failure -C %CONFIGURATION%