mirror of
https://github.com/boostorg/io.git
synced 2025-07-30 12:27:13 +02:00
Merge pull request #3 from Mike-Devel/min_cmake
[CMake] Add minimal cmake file
This commit is contained in:
12
.travis.yml
12
.travis.yml
@ -17,6 +17,18 @@ branches:
|
|||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
env: TEST_CMAKE=TRUE #Only for easier identification in travis web gui
|
||||||
|
install:
|
||||||
|
- git clone --depth 1 https://github.com/boostorg/config.git ../config
|
||||||
|
|
||||||
|
script:
|
||||||
|
- mkdir __build__ && cd __build__
|
||||||
|
- cmake ../test/test_cmake
|
||||||
|
- 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
|
||||||
|
16
CMakeLists.txt
Normal file
16
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
|
||||||
|
|
||||||
|
cmake_minimum_required( VERSION 3.5 )
|
||||||
|
project( BoostIO LANGUAGES CXX )
|
||||||
|
|
||||||
|
add_library( boost_io INTERFACE )
|
||||||
|
add_library( Boost::io ALIAS boost_io )
|
||||||
|
|
||||||
|
target_include_directories( boost_io INTERFACE include )
|
||||||
|
|
||||||
|
target_link_libraries( boost_io
|
||||||
|
INTERFACE
|
||||||
|
Boost::config
|
||||||
|
)
|
17
test/test_cmake/CMakeLists.txt
Normal file
17
test/test_cmake/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# 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.IO.
|
||||||
|
# It only tests, if the CMakeLists.txt file in the
|
||||||
|
# Boost.IO root directory works as expected.
|
||||||
|
|
||||||
|
cmake_minimum_required( VERSION 3.5 )
|
||||||
|
|
||||||
|
project( BoostIoCMakeSelfTest )
|
||||||
|
|
||||||
|
add_subdirectory( ../../../config ${CMAKE_CURRENT_BINARY_DIR}/libs/config )
|
||||||
|
add_subdirectory( ../.. ${CMAKE_CURRENT_BINARY_DIR}/libs/io )
|
||||||
|
|
||||||
|
add_executable( boost_io_cmake_self_test main.cpp )
|
||||||
|
target_link_libraries( boost_io_cmake_self_test Boost::io )
|
5
test/test_cmake/main.cpp
Normal file
5
test/test_cmake/main.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include <boost/io/ios_state.hpp>
|
||||||
|
#include <boost/io_fwd.hpp>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
}
|
Reference in New Issue
Block a user