Merge pull request #244 from boostorg/cmake_test

Add minimal CMake test script - just enough to verify the interface d…
This commit is contained in:
jzmaddock
2018-10-06 09:56:17 +01:00
committed by GitHub
2 changed files with 35 additions and 0 deletions

View File

@ -251,6 +251,14 @@ matrix:
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
osx_image: xcode6.4
- os: linux
env: CMAKE_TEST_PROJECT=1
install: true
script:
- mkdir __build__ && cd __build__
- cmake ../test
- cmake --build .
install:
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
- cd ..

27
test/CMakeLists.txt Normal file
View File

@ -0,0 +1,27 @@
# Copyright 2018 John Maddock
# 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
#
# CAUTION!!!!
#
# This addition to Boost.Config should be considered experimental and is part
# of an ongoing effort to add CMake support Boost-wide.
#
# IT IS HIGHLY LIKELY THAT THIS FILE WILL CHANGE WITHOUT NOTICE!!!
#
# DO NOT REPLY ON THE CONTENTS OF THIS FILE!!!
#
# In particular this is not a comprehensive test suite, just a quick check
# that the root CMakeLists.txt works OK, and a convenience for folks who
# want to import these projects into their IDE.
#
cmake_minimum_required(VERSION 3.5)
add_subdirectory(.. ${CMAKE_CURRENT_BINARY_DIR}/boost_config)
add_executable(config_info config_info.cpp)
target_link_libraries(config_info Boost::config)
add_executable(config_test config_test.cpp)
target_link_libraries(config_test Boost::config)