diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a5ae5ec --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: cpp + +compiler: + - clang + - gcc + +before_install: + - sudo apt-get update -qq + +install: + - sudo apt-get install libboost-dev libboost-regex-dev + +before_script: + - mkdir -p build + +script: + - pushd build + - cmake .. + - make + - ./test_suite + - popd diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..8ba6a0d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required (VERSION 2.6) +project (valijson) + +set(Boost_USE_STATIC_LIBS OFF) +set(Boost_USE_MULTITHREADED ON) +set(Boost_USE_STATIC_RUNTIME OFF) + +find_package(Boost 1.55.0 COMPONENTS regex) + +# jsoncpp library +add_library(jsoncpp + thirdparty/jsoncpp-0.5.0/src/lib_json/json_reader.cpp + thirdparty/jsoncpp-0.5.0/src/lib_json/json_value.cpp + thirdparty/jsoncpp-0.5.0/src/lib_json/json_writer.cpp +) + +# Build local gtest +add_subdirectory(thirdparty/gtest-1.7.0) + +# Include path +include_directories(include thirdparty/gtest-1.7.0/include thirdparty/jsoncpp-0.5.0/include thirdparty/rapidjson-0.1/include) + +# Unit tests executable +add_executable(test_suite + tests/test_adapter_comparison.cpp + tests/test_dereference_callback.cpp + tests/test_jsoncpp_adapter.cpp + tests/test_property_tree_adapter.cpp + tests/test_rapidjson_adapter.cpp + tests/test_uri_resolution.cpp + tests/test_validation_errors.cpp + tests/test_validator.cpp +) + +set(TEST_LIBS gtest gtest_main jsoncpp) + +target_link_libraries(test_suite ${TEST_LIBS} ${Boost_LIBRARIES}) diff --git a/README.md b/README.md index 4a07b1e..5fe61ba 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Valijson +Valijson [![Build Status](https://travis-ci.org/tristanpenman/valijson.svg?branch=master)](https://travis-ci.org/tristanpenman/valijson) ======== Overview