2
0
mirror of https://github.com/boostorg/parser.git synced 2026-02-21 15:22:10 +00:00

Add define BOOST_PARSER_DISABLE_TRACE to disable trace mode at compile time.

The trace feature doubles the compile time, even if never used.
This patch introduces the preprocessor define BOOST_PARSER_DISABLE_TRACE
to deactivate this feature at compile time.
This commit is contained in:
Andreas Buhr
2025-08-07 14:10:37 +02:00
committed by Zach Laine
parent 1b984e3546
commit 4a200a4074
10 changed files with 206 additions and 17 deletions

View File

@@ -18,6 +18,13 @@ jobs:
compiler_version: [g++-10, g++-11]
cxx_std: [17, 20]
os: [ubuntu-22.04]
disable_trace: [false]
include:
# Test with trace disabled
- compiler_version: g++-11
cxx_std: 20
os: ubuntu-22.04
disable_trace: true
runs-on: ${{ matrix.os }}
@@ -30,7 +37,11 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler_version }} -DCXX_STD=${{ matrix.cxx_std }}
if [ "${{ matrix.disable_trace }}" = "true" ]; then
cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler_version }} -DCXX_STD=${{ matrix.cxx_std }} -DDISABLE_TRACE=true
else
cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler_version }} -DCXX_STD=${{ matrix.cxx_std }}
fi
- name: Build
run: cd build ; make -j4

View File

@@ -17,6 +17,12 @@ jobs:
matrix:
cxx_std: [17, 20, 23]
os: [windows-2022]
disable_trace: [false]
include:
# Test with trace disabled
- cxx_std: 20
os: windows-2022
disable_trace: true
runs-on: ${{ matrix.os }}
@@ -26,7 +32,13 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. Visual Studio is a multi-config generator, so we don't use CMAKE_BUILD_TYPE.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B build -DCXX_STD=${{ matrix.cxx_std }}
run: |
if ("${{ matrix.disable_trace }}" -eq "true") {
cmake -B build -DCXX_STD=${{ matrix.cxx_std }} -DDISABLE_TRACE=true
} else {
cmake -B build -DCXX_STD=${{ matrix.cxx_std }}
}
shell: pwsh
- name: Build
working-directory: build