From 85f716830d1f59a7609ddd8e083752aecd29b855 Mon Sep 17 00:00:00 2001 From: Mike Dev Date: Fri, 14 Sep 2018 15:00:28 +0200 Subject: [PATCH 1/5] [CMake] Generate cmake target that other libraries can use ... to express their dependency on this library and retrieve any configuration information such as the include directory, binary to link to (if any), transitive dependencies, necessary compiler options or the required c++ standards level. --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..2d0b9cad --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.8) +project(boost-config LANGUAGES CXX) + +add_library(boost_config INTERFACE) +add_library(Boost::config ALIAS boost_config) + +target_include_directories(boost_config INTERFACE include) From 1f5fc3c74bcc53827ad7dbdc0715f3501ac98f0a Mon Sep 17 00:00:00 2001 From: Mike Dev Date: Wed, 19 Sep 2018 18:37:32 +0200 Subject: [PATCH 2/5] [CMake] Lower requirement to 3.5 and rename project to BoostConfig --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d0b9cad..78cd8827 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.8) -project(boost-config LANGUAGES CXX) +cmake_minimum_required(VERSION 3.5) +project(BoostConfig LANGUAGES CXX) add_library(boost_config INTERFACE) add_library(Boost::config ALIAS boost_config) From 6b238b5d1c0cd94299223c0877468257f4e68d7f Mon Sep 17 00:00:00 2001 From: Mike Dev Date: Tue, 25 Sep 2018 16:37:33 +0200 Subject: [PATCH 3/5] [CMake] Add copyright notice --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78cd8827..2483832d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +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 + cmake_minimum_required(VERSION 3.5) project(BoostConfig LANGUAGES CXX) From fe45ca1601c1ec04e996148ea723b4769613fa27 Mon Sep 17 00:00:00 2001 From: Mike Dev Date: Tue, 25 Sep 2018 20:08:34 +0200 Subject: [PATCH 4/5] [CMake] Test cmake target on travis --- .travis.yml | 8 +++++++- test/cmake/CMakeLists.txt | 13 +++++++++++++ test/cmake/main.cpp | 7 +++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 test/cmake/CMakeLists.txt create mode 100644 test/cmake/main.cpp diff --git a/.travis.yml b/.travis.yml index 9692e361..43de396e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -264,7 +264,10 @@ install: - cp -r $TRAVIS_BUILD_DIR/* libs/config - ./bootstrap.sh - ./b2 headers - + - cd .. + - git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/config.git boost-config-standalone + - mkdir cmake-build + script: - |- 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 - unset IFS - ./b2 -j3 libs/config/test toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT + - cd ../cmake-build + - cmake ../boost-config-standalone/test/cmake + - cmake --build . notifications: email: diff --git a/test/cmake/CMakeLists.txt b/test/cmake/CMakeLists.txt new file mode 100644 index 00000000..a8cd7bf1 --- /dev/null +++ b/test/cmake/CMakeLists.txt @@ -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) + + diff --git a/test/cmake/main.cpp b/test/cmake/main.cpp new file mode 100644 index 00000000..ec7f32a3 --- /dev/null +++ b/test/cmake/main.cpp @@ -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 + +int main() {} From 9d084e53102ef88c69536b52c2dbefa5390e8953 Mon Sep 17 00:00:00 2001 From: Mike Dev Date: Thu, 27 Sep 2018 18:17:22 +0200 Subject: [PATCH 5/5] [CI/CMake] Remove cmake build from ci --- .travis.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 43de396e..9692e361 100644 --- a/.travis.yml +++ b/.travis.yml @@ -264,10 +264,7 @@ install: - cp -r $TRAVIS_BUILD_DIR/* libs/config - ./bootstrap.sh - ./b2 headers - - cd .. - - git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/config.git boost-config-standalone - - mkdir cmake-build - + script: - |- echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam @@ -275,9 +272,6 @@ 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 - unset IFS - ./b2 -j3 libs/config/test toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT - - cd ../cmake-build - - cmake ../boost-config-standalone/test/cmake - - cmake --build . notifications: email: