Merge pull request #92 from Flamefire/clean_build_dir

Clean build dir
This commit is contained in:
Mathieu Champlon 2020-08-03 07:29:48 +02:00 committed by GitHub
commit 08213cd723
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 174 additions and 268 deletions

63
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,63 @@
# Copyright 2020 Alexander Grund
# 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)
name: Release
on:
push:
branches: [master]
tags: ['v*']
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
env:
BOOST_VERSION: 1.71.0
BOOST_ROOT: ${{github.workspace}}/dependencies/boost
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: boostorg/boost
ref: boost-${{env.BOOST_VERSION}}
path: ${{env.BOOST_ROOT}}
fetch-depth: 1
- name: Prepare boost
working-directory: ${{env.BOOST_ROOT}}
run: |
git submodule update --init --jobs 3 tools/boostdep tools/quickbook tools/boostbook
python tools/boostdep/depinst/depinst.py --exclude test --git_args '--jobs 3' ../tools/quickbook
./bootstrap.sh || (cat bootstrap.log && false)
- name: Install dependencies
run: sudo apt-get install xsltproc docbook-xsl docbook-xml
- name: Create documentation
run: scripts/build_doc.sh -j3
- name: Package documentation
run: tar -czvf turtle_doc.tar.gz html
working-directory: doc
# This runs only when actual tags are created
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
C++ mock object library for Boost
draft: true
prerelease: false
- name: Upload docs
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: doc/turtle_doc.tar.gz
asset_name: turtle_doc.tar.gz
asset_content_type: application/tar.gz

2
.gitignore vendored
View file

@ -1,5 +1,5 @@
.vscode .vscode
bin bin
out out
build/xsl /build
__build __build

View file

@ -3,11 +3,7 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
# #
# Copyright Antony Polukhin 2014. # Copyright Antony Polukhin 2014.
# Copyright Alexander Grund 2020.
#
# See https://svn.boost.org/trac/boost/wiki/TravisCoverals for description of this file
# and how it can be used with Boost libraries.
#
language: cpp language: cpp
@ -49,10 +45,6 @@ before_install:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
- gcc --version - gcc --version
# Set this to the name of your Boost library
# Autodetect library name by using the following code: - PROJECT_TO_TEST=$(basename $(pwd))
- PROJECT_TO_TEST=$(basename $(pwd))
# Files, which coverage results must be ignored (files from other projects). Example: - IGNORE_COVERAGE='*/boost/progress.hpp */filesystem/src/path.cpp' # Files, which coverage results must be ignored (files from other projects). Example: - IGNORE_COVERAGE='*/boost/progress.hpp */filesystem/src/path.cpp'
- IGNORE_COVERAGE='*/boost-local/*' - IGNORE_COVERAGE='*/boost-local/*'
@ -60,21 +52,21 @@ before_install:
# Cloning Boost libraries (fast nondeep cloning) # Cloning Boost libraries (fast nondeep cloning)
- PROJECT_DIR=`pwd` - PROJECT_DIR=`pwd`
- git --version - git --version
- BOOST=$HOME/boost-local - BOOST_ROOT=$HOME/boost-local
- git clone -b $BRANCH_TO_TEST --depth 1 https://github.com/boostorg/boost.git $BOOST - git clone -b $BRANCH_TO_TEST --depth 1 https://github.com/boostorg/boost.git $BOOST_ROOT
- cd $BOOST - cd $BOOST_ROOT
- git submodule update --init --depth 1 - git submodule update --init --depth 1
- ./bootstrap.sh - ./bootstrap.sh
- ./b2 headers - ./b2 headers
script: script:
- cd $PROJECT_DIR - cd $PROJECT_DIR
- export BOOST_ROOT=$BOOST - export BOOST_ROOT
# `--coverage` flags required to generate coverage info for Coveralls # `--coverage` flags required to generate coverage info for Coveralls
- build/build.sh --toolset=$CC "cxxflags=-std=c++$CXX_STANDARD -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations --coverage" "linkflags=--coverage" -j3 - scripts/build.sh --toolset=$CC "cxxflags=-std=c++$CXX_STANDARD -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations --coverage" "linkflags=--coverage" -j3
# CMake build # CMake build
- cd $BOOST && ./b2 --with-test --with-thread --with-chrono --with-system --with-atomic --with-date_time -a -j3 # Build required libs - cd $BOOST_ROOT && ./b2 --with-test --with-thread --with-chrono --with-system --with-atomic --with-date_time -a -j3 # Build required libs
- mkdir $PROJECT_DIR/__build && cd $PROJECT_DIR/__build - mkdir $PROJECT_DIR/build && cd $PROJECT_DIR/build
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-std=c++$CXX_STANDARD" - cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-std=c++$CXX_STANDARD"
- cmake --build . --config Debug -- -j3 - cmake --build . --config Debug -- -j3
- ctest --output-on-failure --build-config Debug - ctest --output-on-failure --build-config Debug

View file

@ -22,7 +22,7 @@ endif()
find_package(Boost 1.58 REQUIRED) find_package(Boost 1.58 REQUIRED)
set(MOCK_VERSION "\"${PROJECT_VERSION}\"") set(MOCK_VERSION "\"${PROJECT_VERSION}\"")
configure_file(build/version.hpp ${CMAKE_CURRENT_BINARY_DIR}/include/turtle/version.hpp @ONLY) configure_file(version.hpp.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/turtle/version.hpp @ONLY)
add_library(turtle INTERFACE) add_library(turtle INTERFACE)
add_library(turtle::turtle ALIAS turtle) add_library(turtle::turtle ALIAS turtle)

View file

@ -1,28 +0,0 @@
# Copyright Rene Rivera 2007.
#
# 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)
# Usage:
#
# bjam [options | properties | targets]
#
# Options:
#
# --boost=<BOOST> The directory of a Boost source tree.
# Default; BOOST env var (if found)
# Default; ../boost (if found)
#
# --boost-build=<BOOST_BUILD>
# The directory for the Boost.Build v2 files.
# Default; BOOST_BUILD_PATH env var (if found)
# Default; BOOST_BUILD env var (if found)
# Default; <BOOST>/tools/build/v2 (if found)
#~ If we have the Boost sources we can use the project...
if [ GLOB $(BOOST) : [ modules.peek project : JAMFILE ] ]
{
use-project /boost : $(BOOST) ;
}

View file

@ -6,9 +6,11 @@
import modules ; import modules ;
local boost = [ modules.peek : BOOST ] ; if BOOST_ROOT
{
local boost = [ modules.peek : BOOST_ROOT ] ;
project mock : requirements <include>$(boost) <include>. ; project mock : requirements <include>$(boost) ;
# This seems to prevent some Boost.Build errors that otherwise occur :-( #use-project /boost : $(boost) ;
use-project /boost : $(boost) ; }

View file

@ -53,7 +53,7 @@ build_script:
- cd %APPVEYOR_BUILD_FOLDER% - cd %APPVEYOR_BUILD_FOLDER%
- if NOT "%CXX_STANDARD%"=="" set CXX_FLAGS=cxxflags=/std:c++%CXX_STANDARD% - if NOT "%CXX_STANDARD%"=="" set CXX_FLAGS=cxxflags=/std:c++%CXX_STANDARD%
- set BUILD_ARGS=address-model=32,64 variant=debug,release - set BUILD_ARGS=address-model=32,64 variant=debug,release
- call build\build.bat --toolset=%TOOLSET% %CXX_FLAGS% -j3 - call scripts\build.bat --toolset=%TOOLSET% %CXX_FLAGS% -j3
for: for:
- matrix: - matrix:
@ -62,8 +62,7 @@ for:
build_script: build_script:
- set BOOST_ROOT=C:\Libraries\boost_%BOOST% - set BOOST_ROOT=C:\Libraries\boost_%BOOST%
- cd %APPVEYOR_BUILD_FOLDER% - cd %APPVEYOR_BUILD_FOLDER%
- mkdir __build - mkdir build && cd build
- cd __build
- cmake .. -DCMAKE_BUILD_TYPE=Debug - cmake .. -DCMAKE_BUILD_TYPE=Debug
- cmake --build . --config Debug - cmake --build . --config Debug
- ctest --output-on-failure --build-config Debug - ctest --output-on-failure --build-config Debug

View file

@ -1,30 +0,0 @@
@echo off
rem Copyright (C) 2015 Mathieu Champlon
rem
rem Distributed under the Boost Software License, Version 1.0.
rem (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
setlocal
rem error if BOOST_ROOT not set
set BOOST=%BOOST_ROOT%
set PROJECT_DIR=%cd%
cd %BOOST%
b2.exe %PROJECT_DIR%\test -q %BUILD_ARGS% %*
if errorlevel 1 exit /b %ERRORLEVEL%
cd %PROJECT_DIR%
set BOOSTBOOK_DIR=%PROJECT_DIR%\bin\turtle\boostbook
xcopy /Y /S /Q /I %BOOST%\tools\boostbook\xsl %BOOSTBOOK_DIR%\xsl
xcopy /Y /S /Q /I %BOOST%\tools\boostbook\dtd %BOOSTBOOK_DIR%\dtd
xcopy /Y /S /Q /I build\boostbook %BOOSTBOOK_DIR%
xcopy /Y /S /Q /I %BOOST%\doc\src\boostbook.css doc\html
xcopy /Y /S /Q /I %BOOST%\doc\src\images\*.png doc\html\images
xcopy /Y /S /Q /I %BOOST%\doc\src\images\callouts\*.png doc\html\images\callouts
if errorlevel 1 exit /b %ERRORLEVEL%
cd %BOOST%
b2.exe %PROJECT_DIR%\doc -q %*
if errorlevel 1 exit /b %ERRORLEVEL%

View file

@ -1 +0,0 @@
extensions = headers,check,run

View file

@ -1,33 +0,0 @@
#!/bin/sh
# Copyright (C) 2015 Mathieu Champlon
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
copy()
{
for dir; do true; done
mkdir -p "$dir"
cp "$@"
}
set -eux
export BOOST="$BOOST_ROOT"
PROJECT_DIR="$(pwd)"
cd "$BOOST"
./b2 "$PROJECT_DIR/test" -q "$@"
cd "$PROJECT_DIR"
export BOOSTBOOK_DIR="$PROJECT_DIR/bin/turtle/boostbook"
copy -r "$BOOST"/tools/boostbook/xsl "$BOOSTBOOK_DIR"
copy -r "$BOOST"/tools/boostbook/dtd "$BOOSTBOOK_DIR"
copy -r build/boostbook/* "$BOOSTBOOK_DIR"
copy "$BOOST"/doc/src/boostbook.css doc/html
copy "$BOOST"/doc/src/images/*.png doc/html/images
copy "$BOOST"/doc/src/images/callouts/*.png doc/html/images/callouts
cd "$BOOST"
./b2 "$PROJECT_DIR/doc" -q "$@"

View file

@ -1,115 +0,0 @@
<!--
Copyright Mathieu Champlon 2008.
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)
-->
<project name="turtle" default="all">
<property environment="env"/>
<fail unless="env.BOOST_ROOT" message="missing BOOST_ROOT environment variable"/>
<property name="boost.dir" value="${env.BOOST_ROOT}"/>
<property name="src.dir" value="${root.dir}"/>
<property name="doc.dir" value="${src.dir}/doc"/>
<property name="libraries.dir" value="${src.dir}/include"/>
<property name="out.dir" value="${root.dir}/bin/poney/${platform}"/>
<property name="boost-mock.dir" value="${out.dir}/boost-mock"/>
<property name="version" value="unreleased"/>
<target name="package" depends="build" description="produce release packages">
<fail unless="version" message="missing version property"/>
<copy file="version.hpp" tofile="${out.dir}/version.hpp" overwrite="true">
<filterset>
<filter token="MOCK_VERSION" value="${version}"/>
</filterset>
</copy>
<mkdir dir="${dist.dir}"/>
<zip destfile="${dist.dir}/${ant.project.name}-${version}.zip">
<fileset dir="${src.dir}" includes="include/**"/>
<zipfileset dir="${doc.dir}/html" prefix="doc"/>
<zipfileset dir="${out.dir}" includes="version.hpp" prefix="include/turtle"/>
</zip>
<tar destfile="${dist.dir}/${ant.project.name}-${version}.tar.bz2" compression="bzip2">
<fileset dir="${src.dir}" includes="include/**"/>
<zipfileset dir="${doc.dir}/html" prefix="doc"/>
<zipfileset dir="${out.dir}" includes="version.hpp" prefix="include/turtle"/>
</tar>
</target>
<target name="all" depends="build,reports,package" description="build documentation, run tests and package distribution"/>
<target name="boost.convert" description="convert Boost.Mock">
<delete dir="${boost-mock.dir}"/>
<copy todir="${boost-mock.dir}">
<fileset dir="${root.dir}" excludes="bin/**"/>
</copy>
<move file="${boost-mock.dir}/include/turtle" tofile="${boost-mock.dir}/include/boost/mock"/>
<delete dir="${boost-mock.dir}/doc/html/turtle"/>
<replaceregexp match="MOCK" replace="BOOST_MOCK" flags="g">
<fileset dir="${boost-mock.dir}" includes="**/*.cpp,**/*.hpp,**/*.qbk"/>
</replaceregexp>
<replaceregexp match="BOOST_MOCK_BOOST_MOCK" replace="BOOST_MOCK" flags="g">
<fileset dir="${boost-mock.dir}" includes="**/*.cpp,**/*.hpp,**/*.qbk"/>
</replaceregexp>
<replaceregexp match='"([^"]+\.hpp)"' replace="&lt;boost/mock/\1&gt;" flags="g">
<fileset dir="${boost-mock.dir}/include" includes="**/*.hpp" excludes="**/detail/*.hpp"/>
</replaceregexp>
<replaceregexp match='"\.\./([^"]+\.hpp)"' replace="&lt;boost/mock/\1&gt;" flags="g">
<fileset dir="${boost-mock.dir}/include" includes="**/*.hpp"/>
</replaceregexp>
<replaceregexp match='"([^"]+\.hpp)"' replace="&lt;boost/mock/detail/\1&gt;" flags="g">
<fileset dir="${boost-mock.dir}/include" includes="**/detail/*.hpp"/>
</replaceregexp>
<replaceregexp match="&lt;turtle/([^&gt;]+)" replace="&lt;boost/mock/\1" flags="g">
<fileset dir="${boost-mock.dir}" includes="**/*.cpp,**/*.hpp,**/*.qbk"/>
</replaceregexp>
<replaceregexp match="(namespace mock)" replace="namespace boost${line.separator}{${line.separator}\1" flags="g">
<fileset dir="${boost-mock.dir}" includes="**/*.cpp,**/*.hpp,**/*.qbk"/>
</replaceregexp>
<replaceregexp match="} // mock" replace="}${line.separator}}" flags="g">
<fileset dir="${boost-mock.dir}" includes="**/*.cpp,**/*.hpp"/>
</replaceregexp>
<replaceregexp match=" mock::" replace=" boost::mock::" flags="g">
<fileset dir="${boost-mock.dir}" includes="**/*.cpp,**/*.hpp,**/*.qbk"/>
</replaceregexp>
<replaceregexp match="^mock::" replace="boost::mock::" flags="m">
<fileset dir="${boost-mock.dir}" includes="**/*.cpp,**/*.hpp,**/*.qbk"/>
</replaceregexp>
<replaceregexp match="http://turtle.sourceforge.net" replace="Boost.Mock" flags="g">
<fileset dir="${boost-mock.dir}" includes="**/*.cpp,**/*.hpp"/>
</replaceregexp>
<replaceregexp match="reference.helpers." replace="reference.helpers.boost_" flags="g">
<fileset dir="${boost-mock.dir}" includes="**/*.qbk"/>
</replaceregexp>
<replaceregexp match="turtle." replace="boost_mock." flags="g">
<fileset dir="${boost-mock.dir}" includes="**/*.qbk"/>
</replaceregexp>
<replaceregexp match="Turtle" replace="Boost.Mock" flags="g">
<fileset dir="${boost-mock.dir}" includes="**/*.qbk"/>
</replaceregexp>
<replaceregexp match="\[include changelog.qbk\]" replace="" flags="g">
<fileset dir="${boost-mock.dir}" includes="**/mock.qbk"/>
</replaceregexp>
</target>
<target name="boost.build" depends="boost.convert" description="build Boost.Mock tests and documentation">
<run dir="${boost-mock.dir}/build" script="build"/>
</target>
<target name="boost.package" depends="boost.build" description="package Boost.Mock">
<fail unless="version" message="missing version property"/>
<zip destfile="${dist.dir}/boost-mock-${version}.zip">
<fileset dir="${boost-mock.dir}" includes="include/**,test/**,doc/**" excludes="**/bin/**"/>
<fileset dir="${boost-mock.dir}" includes="LICENSE_1_0.txt,index.html"/>
</zip>
<tar destfile="${dist.dir}/boost-mock-${version}.tar.bz2" compression="bzip2">
<fileset dir="${boost-mock.dir}" includes="include/**,test/**,doc/**" excludes="**/bin/**"/>
<fileset dir="${boost-mock.dir}" includes="LICENSE_1_0.txt,index.html"/>
</tar>
</target>
<target name="boost" depends="boost.convert,boost.build,boost.package" description="convert and package to boost with documentation and tests"/>
</project>

View file

@ -1,17 +0,0 @@
# $ docker build --platform=linux -f clang/Dockerfile -t turtle-clang .
FROM buildpack-deps:stretch
RUN apt-get update && apt-get install -y xsltproc docbook-xsl docbook-xml && apt-get autoremove && apt-get clean
ENV DOCBOOK_XSL_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl \
DOCBOOK_DTD_DIR=/usr/share/xml/docbook/schema/dtd/4.2 \
BOOST_ROOT=/home/dev/cpp/boost/
# wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add - && \
RUN echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-5.0 main" >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --allow-unauthenticated clang-5.0 lld-5.0 libc++1 && \
apt-get autoremove && \
apt-get clean && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 100 && \
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100
RUN echo 'cd /home/dev/cpp/turtle/build' >> ~/.bashrc
# $ docker run --platform=linux --rm -v C:/dev:/home/dev -m 32g -it turtle-clang
# ./build.sh --toolset=clang "cxxflags=-std=c++17 -stdlib=libc++ -Wno-unused-variable"

View file

@ -1,9 +0,0 @@
# $ docker build -f Dockerfile -t turtle-gcc .
FROM gcc
RUN apt-get update && apt-get install -y xsltproc docbook-xsl docbook-xml && apt-get autoremove && apt-get clean
ENV DOCBOOK_XSL_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl \
DOCBOOK_DTD_DIR=/usr/share/xml/docbook/schema/dtd/4.2 \
BOOST_ROOT=/home/dev/cpp/boost/
RUN echo 'cd /home/dev/cpp/turtle/build' >> ~/.bashrc
# $ docker run --platform=linux --rm -v C:/dev:/home/dev -m 16g -it turtle-gcc
# ./build.sh --toolset=gcc "cxxflags=-std=c++17 -Wno-noexcept-type -Wno-unused-variable -Wno-unused-function -Wno-deprecated-declarations"

View file

@ -1,5 +1,3 @@
# Boost.Mock
#
# Copyright Mathieu Champlon 2012 # Copyright Mathieu Champlon 2012
# #
# Distributed under the Boost Software License version 1.0. (See # Distributed under the Boost Software License version 1.0. (See
@ -46,7 +44,15 @@ project example
rule compile-examples rule compile-examples
{ {
for name in [ glob example/*.cpp ] { compile $(name) ; } local examples ;
for name in [ glob example/*.cpp ]
{
local compile-target = [ compile $(name) ] ;
explicit $(compile-target) ;
examples += $(compile-target) ;
}
return $(examples) ;
} }
alias mock_examples : [ compile-examples ] ; alias mock_examples : [ compile-examples ] ;
explicit mock_examples ;

View file

@ -7,8 +7,7 @@
[article Turtle [article Turtle
[quickbook 1.5] [quickbook 1.5]
[/ [authors [Champlon, Mathieu]] ] [authors [Champlon, Mathieu]]
[authors [,A C++ mock object library for Boost]]
[copyright 2008-2014 Mathieu Champlon] [copyright 2008-2014 Mathieu Champlon]
[license [license
Distributed under the [@http://www.boost.org/LICENSE_1_0.txt Boost Software License, Version 1.0]. Distributed under the [@http://www.boost.org/LICENSE_1_0.txt Boost Software License, Version 1.0].
@ -16,8 +15,6 @@
[/ [purpose A C++ mock object library for Boost] ] [/ [purpose A C++ mock object library for Boost] ]
] ]
[note Turtle is not an official Boost library.]
[/ [/
[section:introduction Introduction] [section:introduction Introduction]

View file

@ -8,7 +8,7 @@ Automatic redirection failed, please go to
<a href="doc/html/index.html">doc/html/index.html</a> <a href="doc/html/index.html">doc/html/index.html</a>
<hr> <hr>
<tt> <tt>
Boost.Mock<br> Turtle<br>
<br> <br>
Copyright Mathieu Champlon 2012<br> Copyright Mathieu Champlon 2012<br>
<br> <br>

30
scripts/build.bat Normal file
View file

@ -0,0 +1,30 @@
@echo off
rem Copyright (C) 2015 Mathieu Champlon
rem
rem Distributed under the Boost Software License, Version 1.0.
rem (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
setlocal
rem Need to set BOOST_ROOT and run from the source root directory
set PROJECT_DIR=%cd%
cd %BOOST_ROOT%
b2.exe %PROJECT_DIR%\test -q %BUILD_ARGS% %*
if errorlevel 1 exit /b %ERRORLEVEL%
cd %PROJECT_DIR%
set BOOSTBOOK_DIR=%PROJECT_DIR%\bin\turtle\boostbook
xcopy /Y /S /Q /I %BOOST_ROOT%\tools\boostbook\xsl %BOOSTBOOK_DIR%\xsl
xcopy /Y /S /Q /I %BOOST_ROOT%\tools\boostbook\dtd %BOOSTBOOK_DIR%\dtd
xcopy /Y /S /Q /I doc\boostbook %BOOSTBOOK_DIR%
xcopy /Y /S /Q /I %BOOST_ROOT%\doc\src\boostbook.css doc\html
xcopy /Y /S /Q /I %BOOST_ROOT%\doc\src\images\*.png doc\html\images
xcopy /Y /S /Q /I %BOOST_ROOT%\doc\src\images\callouts\*.png doc\html\images\callouts
if errorlevel 1 exit /b %ERRORLEVEL%
cd %BOOST_ROOT%
b2.exe %PROJECT_DIR%\doc -q %*
if errorlevel 1 exit /b %ERRORLEVEL%

20
scripts/build.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
# Copyright (C) 2015 Mathieu Champlon
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
set -eux
# Need to set BOOST_ROOT and run from the source root directory
PROJECT_DIR="$(pwd)"
cd "$BOOST_ROOT"
./b2 "$PROJECT_DIR/test" -q "$@"
cd "$PROJECT_DIR"
scripts/build_doc.sh "$@"
cd "$BOOST_ROOT"
./b2 "$PROJECT_DIR/doc//mock_examples" -q "$@"

31
scripts/build_doc.sh Executable file
View file

@ -0,0 +1,31 @@
#!/bin/bash
# Copyright (C) 2015 Mathieu Champlon
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Execute from repo root folder or set PROJECT_DIR
# Requires BOOST_ROOT to be set
set -eu
copy()
{
for dir; do true; done
mkdir -p "$dir"
cp "$@"
}
PROJECT_DIR="${PROJECT_DIR:-$(pwd)}"
export BOOSTBOOK_DIR="${PROJECT_DIR}/bin/turtle/boostbook"
copy -r "$BOOST_ROOT"/tools/boostbook/xsl "$BOOSTBOOK_DIR"
copy -r "$BOOST_ROOT"/tools/boostbook/dtd "$BOOSTBOOK_DIR"
copy -r doc/boostbook/* "$BOOSTBOOK_DIR"
copy "$BOOST_ROOT"/doc/src/boostbook.css doc/html
copy "$BOOST_ROOT"/doc/src/images/*.png doc/html/images
copy "$BOOST_ROOT"/doc/src/images/callouts/*.png doc/html/images/callouts
cd "$BOOST_ROOT"
./b2 "$PROJECT_DIR/doc" -q "$@"

View file

@ -1,5 +1,3 @@
# Boost.Mock
#
# Copyright Mathieu Champlon 2012 # Copyright Mathieu Champlon 2012
# #
# Distributed under the Boost Software License version 1.0. (See # Distributed under the Boost Software License version 1.0. (See

View file

@ -7,3 +7,4 @@
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
#define MOCK_VERSION @MOCK_VERSION@ #define MOCK_VERSION @MOCK_VERSION@
#define TURTLE_VERSION "@turtle_VERSION@"