Skip to content

Target scoped cxx standard#515

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
r1viollet/refactor/target-scoped-cxx-standard
Mar 19, 2026
Merged

Target scoped cxx standard#515
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
r1viollet/refactor/target-scoped-cxx-standard

Conversation

@r1viollet

@r1viollet r1viollet commented Mar 19, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Replacement of the following PR

Motivation

Refer to original PR.
Essentially allows to integrate well with other builds.

Additional Notes

NA

How to test the change?

Already tested

The global `CMAKE_CXX_STANDARD` / `CMAKE_C_STANDARD` in
ExtendBuildTypes.cmake conflicts with toolchain-injected values when
ddprof is built as a dependency (e.g. Conan with C++23, extensions OFF).
This breaks compilation because ddprof's logging macros use `typeof`,
a GNU extension.

Move the standard to per-target properties via `ddprof_set_standard()`.
Target properties take precedence over global variables and toolchain
cache entries, so ddprof compiles correctly regardless of the parent
project's settings.

Applied to all ddprof-owned targets: ddprof, dd_profiling-embedded,
dd_profiling-static, dd_profiling-shared, dd_loader, event_parser,
and all executables created through `add_exe()`.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@pr-commenter

pr-commenter Bot commented Mar 19, 2026

Copy link
Copy Markdown

Benchmark results for collatz

Parameters

Baseline Candidate
config baseline candidate
profiler-version ddprof 0.23.0+0c700352.103448873 ddprof 0.23.0+bf349317.103513466

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

See unchanged results
scenario Δ mean execution_time
scenario:ddprof -S bench-collatz --preset cpu_only collatz_runner.sh same

@pr-commenter

pr-commenter Bot commented Mar 19, 2026

Copy link
Copy Markdown

Benchmark results for BadBoggleSolver_run

Parameters

Baseline Candidate
config baseline candidate
profiler-version ddprof 0.23.0+0c700352.103448873 ddprof 0.23.0+bf349317.103513466

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

See unchanged results
scenario Δ mean execution_time
scenario:ddprof -S bench-bad-boggle-solver BadBoggleSolver_run work 1000 same

@r1viollet
r1viollet marked this pull request as ready for review March 19, 2026 14:17
@r1viollet
r1viollet requested a review from nsavoire as a code owner March 19, 2026 14:17
Comment thread cmake/Helperfunc.cmake
Comment thread cmake/Helperfunc.cmake Outdated
Comment thread cmake/Helperfunc.cmake
endforeach()

add_executable(${name} ${exe_sources})
ddprof_set_standard(${name})

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nsavoire this is in add_exe ? I'm not sure I follow your question

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused, it was not there when I reviewed this version:
80bc411

@r1viollet
r1viollet force-pushed the r1viollet/refactor/target-scoped-cxx-standard branch from 80bc411 to bf34931 Compare March 19, 2026 15:03
@r1viollet
r1viollet requested a review from nsavoire March 19, 2026 15:05
@r1viollet

Copy link
Copy Markdown
Collaborator Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Mar 19, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-03-19 15:28:34 UTC ℹ️ Start processing command /merge


2026-03-19 15:28:40 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-03-19 15:37:23 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in main is approximately 22m (p90).


2026-03-19 15:51:48 UTC ℹ️ MergeQueue: This merge request was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants