forked from boostorg/preprocessor
Merge pull request #20 from Mike-Devel/min_cmake
[CMake] Generate cmake target that other libraries can use
This commit is contained in:
@ -17,6 +17,15 @@ branches:
|
|||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- install: true
|
||||||
|
script:
|
||||||
|
- mkdir __build__ && cd __build__
|
||||||
|
- cmake ../test
|
||||||
|
- cmake --build .
|
||||||
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- cd ..
|
- cd ..
|
||||||
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
12
CMakeLists.txt
Normal file
12
CMakeLists.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# 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(BoostPreprocessor LANGUAGES CXX)
|
||||||
|
|
||||||
|
add_library(boost_preprocessor INTERFACE)
|
||||||
|
add_library(Boost::preprocessor ALIAS boost_preprocessor)
|
||||||
|
|
||||||
|
target_include_directories(boost_preprocessor INTERFACE include)
|
||||||
|
|
32
appveyor.yml
32
appveyor.yml
@ -1,4 +1,5 @@
|
|||||||
# Copyright 2017 Edward Diener
|
# Copyright 2017 Edward Diener
|
||||||
|
# Copyright 2018 Mike Dev
|
||||||
# Distributed under the Boost Software License, Version 1.0.
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
@ -6,6 +7,10 @@ version: 1.0.{build}-{branch}
|
|||||||
|
|
||||||
shallow_clone: true
|
shallow_clone: true
|
||||||
|
|
||||||
|
configuration:
|
||||||
|
- boost_test
|
||||||
|
- cmake_self_test
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
@ -18,7 +23,26 @@ environment:
|
|||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
TOOLSET: msvc-14.1
|
TOOLSET: msvc-14.1
|
||||||
|
|
||||||
install:
|
build: off
|
||||||
|
|
||||||
|
for:
|
||||||
|
-
|
||||||
|
matrix:
|
||||||
|
only:
|
||||||
|
- configuration: cmake_self_test
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
- mkdir __build__
|
||||||
|
- cd __build__
|
||||||
|
- cmake ../test
|
||||||
|
- cmake --build .
|
||||||
|
|
||||||
|
-
|
||||||
|
matrix:
|
||||||
|
only:
|
||||||
|
- configuration: boost_test
|
||||||
|
|
||||||
|
install:
|
||||||
- cd ..
|
- cd ..
|
||||||
- git clone -b %APPVEYOR_REPO_BRANCH% https://github.com/boostorg/boost.git boost-root
|
- git clone -b %APPVEYOR_REPO_BRANCH% https://github.com/boostorg/boost.git boost-root
|
||||||
- cd boost-root
|
- cd boost-root
|
||||||
@ -30,7 +54,7 @@ install:
|
|||||||
- bootstrap
|
- bootstrap
|
||||||
- b2 headers
|
- b2 headers
|
||||||
|
|
||||||
build: off
|
test_script:
|
||||||
|
|
||||||
test_script:
|
|
||||||
- b2 libs/preprocessor/test toolset=%TOOLSET%
|
- b2 libs/preprocessor/test toolset=%TOOLSET%
|
||||||
|
- cd ../preprocessor/test
|
||||||
|
|
||||||
|
16
test/CMakeLists.txt
Normal file
16
test/CMakeLists.txt
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# 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 (yet).
|
||||||
|
# It only tests, if the CMakeLists.txt file works as expected
|
||||||
|
|
||||||
|
cmake_minimum_required( VERSION 3.5 )
|
||||||
|
|
||||||
|
project( BoostPreprocessorCMakeSelfTest )
|
||||||
|
|
||||||
|
add_subdirectory( .. ${CMAKE_CURRENT_BINARY_DIR}/boost_preprocessor )
|
||||||
|
|
||||||
|
add_executable( boost_preprocessor_cmake_self_test config_info.cpp )
|
||||||
|
target_link_libraries( boost_preprocessor_cmake_self_test Boost::preprocessor )
|
||||||
|
|
Reference in New Issue
Block a user