mirror of
https://github.com/boostorg/boost_install.git
synced 2026-07-21 13:13:30 +00:00
Add test/filesystem
This commit is contained in:
+8
-4
@@ -12,6 +12,10 @@ branches:
|
||||
- develop
|
||||
- /feature\/.*/
|
||||
|
||||
environment:
|
||||
- LIB=system
|
||||
- LIB=filesystem
|
||||
|
||||
install:
|
||||
- set BOOST_BRANCH=feature/cmake-config
|
||||
- cd ..
|
||||
@@ -21,16 +25,16 @@ install:
|
||||
- git submodule update --init libs/config
|
||||
- git submodule update --init tools/boostdep
|
||||
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% tools\cmake_config\
|
||||
- git submodule update --init libs/system
|
||||
- python tools/boostdep/depinst/depinst.py system
|
||||
- git submodule update --init libs/%LIB%
|
||||
- python tools/boostdep/depinst/depinst.py %LIB%
|
||||
- cmd /c bootstrap
|
||||
|
||||
build: off
|
||||
|
||||
test_script:
|
||||
- b2 --prefix=C:\projects\.local tools/cmake_config/build//install
|
||||
- b2 --prefix=C:\projects\.local libs/system/build//install link=static,shared
|
||||
- cd tools\cmake_config\test\system
|
||||
- b2 --prefix=C:\projects\.local libs/%LIB%/build//install link=static,shared
|
||||
- cd tools\cmake_config\test\%LIB%
|
||||
- mkdir __build__ && cd __build__
|
||||
- cmake -DCMAKE_INSTALL_PREFIX=C:\projects\.local ..
|
||||
- cmake --build . --config Debug
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Copyright 2018 Peter Dimov
|
||||
# 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)
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(CmakeConfigFilesystemTest LANGUAGES CXX)
|
||||
|
||||
find_package(boost_filesystem 1.69.0 EXACT CONFIG)
|
||||
|
||||
add_executable(main quick.cpp)
|
||||
target_link_libraries(main Boost::filesystem)
|
||||
|
||||
enable_testing()
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||
|
||||
add_test(main main)
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
// Copyright 2017 Peter Dimov.
|
||||
//
|
||||
// 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
|
||||
|
||||
// See library home page at http://www.boost.org/libs/system
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
int main()
|
||||
{
|
||||
fs::path p1( "a" );
|
||||
fs::path p2 = p1 / "b";
|
||||
|
||||
BOOST_TEST_EQ( p2, "a/b" );
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
Reference in New Issue
Block a user