diff --git a/.travis.yml b/.travis.yml index 92c2ee7..dd85603 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,15 @@ branches: - master - develop +matrix: + include: + - install: true + script: + - mkdir __build__ && cd __build__ + - cmake ../test + - cmake --build . + + install: - cd .. - git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..c0f41f9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright 2018 Mike Dev +# Distributed under the Boost Software License, Version 1.0. +# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt + +cmake_minimum_required(VERSION 3.5) +project(BoostPreprocessor LANGUAGES CXX) + +add_library(boost_preprocessor INTERFACE) +add_library(Boost::preprocessor ALIAS boost_preprocessor) + +target_include_directories(boost_preprocessor INTERFACE include) + diff --git a/appveyor.yml b/appveyor.yml index 1fefc07..3d07613 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,5 @@ # Copyright 2017 Edward Diener +# Copyright 2018 Mike Dev # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) @@ -6,6 +7,10 @@ version: 1.0.{build}-{branch} shallow_clone: true +configuration: + - boost_test + - cmake_self_test + branches: only: - master @@ -18,19 +23,38 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 TOOLSET: msvc-14.1 -install: - - cd .. - - git clone -b %APPVEYOR_REPO_BRANCH% https://github.com/boostorg/boost.git boost-root - - cd boost-root - - git submodule update --init tools/build - - git submodule update --init libs/config - - git submodule update --init tools/boostdep - - xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\preprocessor - - python tools/boostdep/depinst/depinst.py preprocessor - - bootstrap - - b2 headers - build: off -test_script: - - b2 libs/preprocessor/test toolset=%TOOLSET% +for: +- + matrix: + only: + - configuration: cmake_self_test + + test_script: + - mkdir __build__ + - cd __build__ + - cmake ../test + - cmake --build . + +- + matrix: + only: + - configuration: boost_test + + install: + - cd .. + - git clone -b %APPVEYOR_REPO_BRANCH% https://github.com/boostorg/boost.git boost-root + - cd boost-root + - git submodule update --init tools/build + - git submodule update --init libs/config + - git submodule update --init tools/boostdep + - xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\preprocessor + - python tools/boostdep/depinst/depinst.py preprocessor + - bootstrap + - b2 headers + + test_script: + - b2 libs/preprocessor/test toolset=%TOOLSET% + - cd ../preprocessor/test + diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..b56c870 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright 2018 Mike Dev +# Distributed under the Boost Software License, Version 1.0. +# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt +# +# NOTE: This does NOT run the unit tests for Boost.Preprocessor (yet). +# It only tests, if the CMakeLists.txt file works as expected + +cmake_minimum_required( VERSION 3.5 ) + +project( BoostPreprocessorCMakeSelfTest ) + +add_subdirectory( .. ${CMAKE_CURRENT_BINARY_DIR}/boost_preprocessor ) + +add_executable( boost_preprocessor_cmake_self_test config_info.cpp ) +target_link_libraries( boost_preprocessor_cmake_self_test Boost::preprocessor ) +