diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ff88c08d..565e906f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -56,14 +56,14 @@ jobs: cmake --build merge/build --parallel - name: Library (cmake) run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release + cmake -B build -DCMAKE_BUILD_TYPE=Release -DTRACY_ENABLE=ON cmake --build build cmake --install build env: CMAKE_INSTALL_PREFIX: ${{ github.workspace }}/bin - name: Library (meson) run: | - meson setup -Dprefix=$GITHUB_WORKSPACE/bin/lib build-meson + meson setup -Dprefix=$GITHUB_WORKSPACE/bin/lib -Dtracy_enable=true build-meson meson compile -C build-meson - name: Test application run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 48f80211..ca92092c 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -50,7 +50,7 @@ jobs: cmake -B merge/build -S merge -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }} cmake --build merge/build --parallel --config Release - name: Build library - run: meson setup -Dprefix=$GITHUB_WORKSPACE/bin/lib build && meson compile -C build && meson install -C build + run: meson setup -Dprefix=$GITHUB_WORKSPACE/bin/lib -Dtracy_enable=true build && meson compile -C build && meson install -C build - name: Package artifacts run: | mkdir -p bin diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 15e5ebad..793452f8 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -30,7 +30,7 @@ jobs: restore-keys: ${{ runner.os }}-cpm- - name: Build TracyClient run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release \ + cmake -B build -DCMAKE_BUILD_TYPE=Release -DTRACY_ENABLE=ON \ -DCMAKE_SYSTEM_NAME=Windows \ -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \ -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ @@ -50,7 +50,7 @@ jobs: cpu = 'x86_64' endian = 'little' EOF - meson setup build-meson --cross-file mingw-cross.txt -Ddefault_library=static + meson setup build-meson --cross-file mingw-cross.txt -Ddefault_library=static -Dtracy_enable=true meson compile -C build-meson - name: Test application run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index d3bc0f1c..b7a37c4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,7 +124,7 @@ macro(tracy_set_option_value var help default) endif() endmacro() -tracy_set_option(TRACY_ENABLE "Enable profiling" ON) +tracy_set_option(TRACY_ENABLE "Enable profiling" OFF) tracy_set_option(TRACY_ON_DEMAND "On-demand profiling" OFF) tracy_set_option_value(TRACY_CALLSTACK "Override the callstack collection depth for tracy zones" "") tracy_set_option(TRACY_NO_CALLSTACK "Disable all callstack related functionality" OFF) diff --git a/meson.options b/meson.options index d8025055..2802db73 100644 --- a/meson.options +++ b/meson.options @@ -1,4 +1,4 @@ -option('tracy_enable', type : 'boolean', value : true, description : 'Enable profiling', yield: true) +option('tracy_enable', type : 'boolean', value : false, description : 'Enable profiling', yield: true) option('on_demand', type : 'boolean', value : false, description : 'On-demand profiling') option('callstack', type : 'integer', value : 0, description : 'Enforce callstack collection for tracy zones x frames deep') option('no_callstack', type : 'boolean', value : false, description : 'Disable all callstack related functionality') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d23da172..9030e031 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -13,6 +13,8 @@ project( file(GENERATE OUTPUT .gitignore CONTENT "*") set(CMAKE_COLOR_DIAGNOSTICS ON) +option(TRACY_ENABLE "Enable profiling" ON) + # a bit weird but works: include the client cmake config coming from top-level # cmake needs us to specify the build subfolder -> client/ this way we can # simply link the test executable against TracyClient