Target scoped cxx standard#515
Conversation
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]>
Benchmark results for collatzParameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics. See unchanged results
|
Benchmark results for BadBoggleSolver_runParameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics. See unchanged results
|
| endforeach() | ||
|
|
||
| add_executable(${name} ${exe_sources}) | ||
| ddprof_set_standard(${name}) |
80bc411 to
bf34931
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
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.
The expected merge time in
|
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