From e75c066ddc447b5f41ca049a2921a0d0dfb0b13e Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Thu, 10 Jun 2021 18:12:22 +0300 Subject: [PATCH] freestanding docs anc CI fixes --- .github/workflows/ci.yml | 3 ++- misc/strip_boost_namespace.sh | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e55d28..24a1a26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,8 +38,9 @@ jobs: cxxstd: "03,11,14" os: ubuntu-16.04 install: clang-3.7 - - toolset: clang-9 + - toolset: clang compiler: clang++-9 + install: clang-9 cxxstd: "03,11,14,17" # Do not run in 2a mode because of the "chrono:1345:24: error: unknown type name 'strong_ordering'" os: ubuntu-20.04 cxxflags: "cxxflags=--coverage" diff --git a/misc/strip_boost_namespace.sh b/misc/strip_boost_namespace.sh index d0e9395..204ab90 100755 --- a/misc/strip_boost_namespace.sh +++ b/misc/strip_boost_namespace.sh @@ -6,9 +6,9 @@ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) echo "***** Making target path" -TARGET_PATH="`dirname \"$0\"`/../../freestanding_pfr" -rm -rf ${TARGET_PATH} -mkdir ${TARGET_PATH} +TARGET_PATH="`dirname \"$0\"`/../../pfr_non_boost" +rm -rf ${TARGET_PATH}/* +mkdir -p ${TARGET_PATH} TARGET_PATH=`cd "${TARGET_PATH}";pwd` SOURCE_PATH="`dirname \"$0\"`/.." @@ -20,6 +20,8 @@ cp -rf ${SOURCE_PATH}/* ${TARGET_PATH} mv ${TARGET_PATH}/include/boost/* ${TARGET_PATH}/include/ rm -rf ${TARGET_PATH}/include/boost rm -rf ${TARGET_PATH}/test +rm ${TARGET_PATH}/misc/strip_boost_namespace.sh +rm -rf ${TARGET_PATH}/meta echo "***** Changing sources" find ${TARGET_PATH} -type f | xargs sed -i 's|namespace boost { ||g' @@ -31,6 +33,10 @@ find ${TARGET_PATH} -type f | xargs sed -i 's/boost::pfr/pfr/g' find ${TARGET_PATH} -type f | xargs sed -i 's/BOOST_PFR_/PFR_/g' find ${TARGET_PATH} -type f | xargs sed -i 's|boost/pfr|pfr|g' +find ${TARGET_PATH}/doc -type f | xargs sed -i '/\[xinclude autodoc_pfr.xml\]/d' +find ${TARGET_PATH}/doc -type f | xargs sed -i 's|boost.pfr.|pfr.|g' +find ${TARGET_PATH}/doc -type f | xargs sed -i 's|Boost.PFR|PFR|g' + echo -n "***** Testing: " if g++-9 -std=c++17 -DPFR_USE_LOOPHOLE=0 -DPFR_USE_CPP17=1 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then echo -n "OK"