From 63ad11c367cb986c0601a0353a8373dda8832ab8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2015 10:42:43 +0100 Subject: [PATCH] add support for `AppVeyor` CI for checking Windows builds --- CMakeLists.txt | 4 ++++ appveyor.yml | 28 ++++++++++++++++++++++++++++ readme.md | 4 ++++ test/unittest/documenttest.cpp | 2 +- test/unittest/valuetest.cpp | 2 -- 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 appveyor.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ed65c8..c96a599 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,10 @@ if(RAPIDJSON_BUILD_EXAMPLES) endif() if(RAPIDJSON_BUILD_TESTS) + if(MSVC11) + # required for VS2012 due to missing support for variadic templates + add_definitions(-D_VARIADIC_MAX=10) + endif(MSVC11) add_subdirectory(test) include(CTest) endif() diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..76ca6ce --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,28 @@ +version: 0.12.{build} + +configuration: +- Debug +- Release + +platform: +- x86 +- x64 + +environment: + matrix: + - VS_VERSION: 11 + - VS_VERSION: 12 + - VS_VERSION: 14 + +before_build: +- git submodule update --init --recursive +- if "%PLATFORM%" == "x86" set PLATFORM=win32 +- cmake -H. -BBuild/VS -G "Visual Studio %VS_VERSION%" -DCMAKE_GENERATOR_PLATFORM=%PLATFORM% -DBUILD_SHARED_LIBS=true -Wno-dev + +build: + project: Build\VS\RapidJSON.sln + parallel: true + verbosity: minimal + +test_script: +- cd Build\VS && ctest --verbose --timeout 120 --build-config %CONFIGURATION% diff --git a/readme.md b/readme.md index 05c0ec3..ee64108 100644 --- a/readme.md +++ b/readme.md @@ -6,6 +6,10 @@ Copyright (c) 2011-2014 Milo Yip (miloyip@gmail.com) [RapidJSON Documentation](http://miloyip.github.io/rapidjson/) +## Build status +* Tavis CI (Linux): [![Travis Build status](https://travis-ci.org/Kosta-Github/rapidjson)](https://travis-ci.org/Kosta-Github/rapidjson) +* AppVeyor (Windows): [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/3xw2isxomp5r4do7/branch/master?svg=true)](https://ci.appveyor.com/project/Kosta-Github/rapidjson/branch/master) + ## Introduction RapidJSON is a JSON parser and generator for C++. It was inspired by [RapidXml](http://rapidxml.sourceforge.net/). diff --git a/test/unittest/documenttest.cpp b/test/unittest/documenttest.cpp index f8be65a..93f7a3d 100644 --- a/test/unittest/documenttest.cpp +++ b/test/unittest/documenttest.cpp @@ -253,8 +253,8 @@ TEST(Document, Traits) { static_assert(!std::is_nothrow_constructible::value, ""); static_assert(!std::is_nothrow_default_constructible::value, ""); - static_assert(!std::is_nothrow_copy_constructible::value, ""); #ifndef _MSC_VER + static_assert(!std::is_nothrow_copy_constructible::value, ""); static_assert(std::is_nothrow_move_constructible::value, ""); #endif diff --git a/test/unittest/valuetest.cpp b/test/unittest/valuetest.cpp index 8644e1f..f09d4c1 100644 --- a/test/unittest/valuetest.cpp +++ b/test/unittest/valuetest.cpp @@ -54,9 +54,7 @@ TEST(Value, Traits) { #ifndef _MSC_VER static_assert(std::is_nothrow_constructible::value, ""); static_assert(std::is_nothrow_default_constructible::value, ""); -#endif static_assert(!std::is_nothrow_copy_constructible::value, ""); -#ifndef _MSC_VER static_assert(std::is_nothrow_move_constructible::value, ""); #endif