diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..1324028 --- /dev/null +++ b/.appveyor.yml @@ -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% \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 256a6e6..61ecbc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ compiler: env: - PLATFORM=x64 CONFIGURATION=Release + - PLATFORM=x64 CONFIGURATION=Debug script: - rm -rf build diff --git a/CMakeLists.txt b/CMakeLists.txt index 437c671..c8f2033 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 22771ca..0000000 --- a/appveyor.yml +++ /dev/null @@ -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% \ No newline at end of file