From f19c65679e1b6da669c9dfc13ac5503dce8f4e26 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 5 Oct 2018 19:32:44 +0100 Subject: [PATCH] Add minimal CMake test script - just enough to verify the interface description. --- .travis.yml | 8 ++++++++ test/CMakeLists.txt | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 test/CMakeLists.txt diff --git a/.travis.yml b/.travis.yml index 9692e361..b481255d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 .. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 00000000..96511ddd --- /dev/null +++ b/test/CMakeLists.txt @@ -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) +