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 index 7375f9d..c0f41f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,3 +9,4 @@ add_library(boost_preprocessor INTERFACE) add_library(Boost::preprocessor ALIAS boost_preprocessor) target_include_directories(boost_preprocessor INTERFACE include) + diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..4008930 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,18 @@ +# 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. +# It only tests, if the CMakeLists.txt file works as expected + +cmake_minimum_required( VERSION 3.5 ) + +project( TestBoostPreprocessorCMakeSelfTest ) + +add_subdirectory( .. ${CMAKE_CURRENT_BINARY_DIR}/boost_preprocessor ) + +# arithmetic.cpp is a randomly chosen source file +# that is compilable on it's own. +add_executable( boost_preprocessor_self_test cmake_self_test.cpp ) +target_link_libraries( boost_preprocessor_self_test Boost::preprocessor ) + diff --git a/test/cmake_self_test.cpp b/test/cmake_self_test.cpp new file mode 100644 index 0000000..2d7b167 --- /dev/null +++ b/test/cmake_self_test.cpp @@ -0,0 +1,3 @@ +#include + +int main() {}