diff --git a/.github/workflows/cmake-find-boost-install.yml b/.github/workflows/cmake-find-boost-install.yml index a5018d1d6..a0736c939 100644 --- a/.github/workflows/cmake-find-boost-install.yml +++ b/.github/workflows/cmake-find-boost-install.yml @@ -46,16 +46,13 @@ jobs: sudo ./b2 install variant=release --with-system - name: CMake - run: | - cmake -B "$GITHUB_WORKSPACE/build" -DCMAKE_VERBOSE_MAKEFILE=ON -DBOOST_JSON_FIND_BOOST=ON + run: cmake -B _build -DCMAKE_VERBOSE_MAKEFILE=ON -DBOOST_JSON_FIND_BOOST=ON - name: Build - run: | - cmake --build "$GITHUB_WORKSPACE/build" --config Release + run: cmake --build _build --config Release - name: Test - run: | - cd "$GITHUB_WORKSPACE/build" - ctest --build-config Release --output-on-failure + working-directory: _build + run: ctest --build-config Release --output-on-failure \ No newline at end of file diff --git a/.github/workflows/cmake-standalone.yml b/.github/workflows/cmake-standalone.yml index b4b0b4475..7fd7de3ec 100644 --- a/.github/workflows/cmake-standalone.yml +++ b/.github/workflows/cmake-standalone.yml @@ -31,14 +31,11 @@ jobs: git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: CMake - run: | - cmake -B "$GITHUB_WORKSPACE/build" -DCMAKE_VERBOSE_MAKEFILE=ON -DBOOST_JSON_STANDALONE=ON + run: cmake -B _build -DCMAKE_VERBOSE_MAKEFILE=ON -DBOOST_JSON_STANDALONE=ON - name: Build - run: | - cmake --build "$GITHUB_WORKSPACE/build" --config Release + run: cmake --build _build --config Release - name: Test - run: | - cd "$GITHUB_WORKSPACE/build" - ctest --build-config Release --output-on-failure + working-directory: _build + run: ctest --build-config Release --output-on-failure diff --git a/.github/workflows/cmake-with-boost-stage.yml b/.github/workflows/cmake-with-boost-stage.yml index ca28be70f..85e8d131b 100644 --- a/.github/workflows/cmake-with-boost-stage.yml +++ b/.github/workflows/cmake-with-boost-stage.yml @@ -16,7 +16,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up environment - id: setenv run: | if [[ "$GITHUB_REF" == *master ]]; then echo "::set-env name=BOOST_BRANCH::master" @@ -25,8 +24,6 @@ jobs: fi echo "::set-env name=BOOST_SELF::$(basename $GITHUB_WORKSPACE)" echo "::set-env name=BOOST_ROOT::$GITHUB_WORKSPACE/boost-root" - echo "::set-output name=boost_self::$(basename $GITHUB_WORKSPACE)" - echo "::set-output name=boost_root::$GITHUB_WORKSPACE/boost-root" - name: Uninstall Boost run: | @@ -45,39 +42,36 @@ jobs: - uses: actions/checkout@v2 with: - path: ${{ steps.setenv.outputs.boost_root }}/libs/${{ steps.setenv.outputs.boost_self }} + path: ${{ env.BOOST_ROOT }}/libs/${{ env.BOOST_SELF }} - name: Checkout submodules shell: bash + working-directory: '${{ env.BOOST_ROOT }}/libs/${{ env.BOOST_SELF }}' run: | - cd "$BOOST_ROOT/libs/$BOOST_SELF" auth_header="$(git config --local --get http.https://github.com/.extraheader)" git submodule sync --recursive git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Run tools/boostdep/depinst/depinst.py + working-directory: '${{ env.BOOST_ROOT }}' run: | - cd $BOOST_ROOT python tools/boostdep/depinst/depinst.py --include bench --include benchmark --include example --include examples --include tools $BOOST_SELF - name: Bootstrap Boost + working-directory: '${{ env.BOOST_ROOT }}' run: | - cd $BOOST_ROOT ./bootstrap.sh ./b2 headers ./b2 variant=release --no-cmake-config --with-system stage - name: CMake - run: | - cd "$BOOST_ROOT/libs/$BOOST_SELF" - cmake -B "$GITHUB_WORKSPACE/build" -DCMAKE_VERBOSE_MAKEFILE=ON + working-directory: '${{ env.BOOST_ROOT }}/libs/${{ env.BOOST_SELF }}' + run: cmake -B _build -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_VERBOSE_MAKEFILE=ON - name: Build - run: | - export VER - cmake --build "$GITHUB_WORKSPACE/build" --config Release + working-directory: '${{ env.BOOST_ROOT }}/libs/${{ env.BOOST_SELF }}' + run: cmake --build _build --config Release - name: Test - run: | - cd "$GITHUB_WORKSPACE/build" - ctest --build-config Release --output-on-failure + working-directory: '${{ env.BOOST_ROOT }}/libs/${{ env.BOOST_SELF }}' + run: ctest --build-config Release --output-on-failure diff --git a/CMakeLists.txt b/CMakeLists.txt index ec2bac7ee..9def4cd03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,11 +14,7 @@ if(BOOST_SUPERPROJECT_VERSION) set(BOOST_JSON_VERSION ${BOOST_SUPERPROJECT_VERSION}) endif() -if (BOOST_SUPERPROJECT_VERSION) - project(boost_json VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) -else() - project(boost_json VERSION "${BOOST_JSON_VERSION}" LANGUAGES CXX) -endif() +project(boost_json VERSION "${BOOST_JSON_VERSION}" LANGUAGES CXX) file(GLOB_RECURSE BOOST_JSON_HEADERS CONFIGURE_DEPENDS include/boost/*.hpp