[CMake] Test cmake target on travis

This commit is contained in:
Mike Dev
2018-09-25 20:08:34 +02:00
parent 6b238b5d1c
commit fe45ca1601
3 changed files with 27 additions and 1 deletions

View File

@ -264,7 +264,10 @@ install:
- cp -r $TRAVIS_BUILD_DIR/* libs/config - cp -r $TRAVIS_BUILD_DIR/* libs/config
- ./bootstrap.sh - ./bootstrap.sh
- ./b2 headers - ./b2 headers
- cd ..
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/config.git boost-config-standalone
- mkdir cmake-build
script: script:
- |- - |-
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
@ -272,6 +275,9 @@ script:
- for CXXLOCAL in $CXXSTD; do (cd libs/config/test && ../../../b2 config_info_travis_install toolset=$TOOLSET cxxstd=$CXXLOCAL $CXXSTD_DIALECT && echo With Standard Version $CXXLOCAL && ./config_info_travis && rm ./config_info_travis) done - for CXXLOCAL in $CXXSTD; do (cd libs/config/test && ../../../b2 config_info_travis_install toolset=$TOOLSET cxxstd=$CXXLOCAL $CXXSTD_DIALECT && echo With Standard Version $CXXLOCAL && ./config_info_travis && rm ./config_info_travis) done
- unset IFS - unset IFS
- ./b2 -j3 libs/config/test toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT - ./b2 -j3 libs/config/test toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT
- cd ../cmake-build
- cmake ../boost-config-standalone/test/cmake
- cmake --build .
notifications: notifications:
email: email:

13
test/cmake/CMakeLists.txt Normal file
View File

@ -0,0 +1,13 @@
# 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(BoostFilesystem_test)
add_subdirectory(../.. ${CMAKE_CURRENT_BINARY_DIR}/boost_config)
add_executable(boost_config_cmake_compilation_test main.cpp)
target_link_libraries(boost_config_cmake_compilation_test Boost::config)

7
test/cmake/main.cpp Normal file
View File

@ -0,0 +1,7 @@
// 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
#include <boost/config.hpp>
int main() {}