Skip to content

[RF] avoid unknown pragma warning when clad is disabled#20510

Merged
guitargeek merged 1 commit intoroot-project:masterfrom
ferdymercury:patch-20
Dec 14, 2025
Merged

[RF] avoid unknown pragma warning when clad is disabled#20510
guitargeek merged 1 commit intoroot-project:masterfrom
ferdymercury:patch-20

Conversation

@ferdymercury
Copy link
Collaborator

@ferdymercury ferdymercury commented Nov 25, 2025

/home/user/builds/build-root_src-Desktop-Debug/include/RooFit/Detail/MathFuncs.h:181:17: warning: expected 'ON' or 'OFF' or 'DEFAULT' in pragma [-Wunknown-pragmas]
   #pragma clad checkpoint loop

Question however:
Is ROOFIT_CLAD defined when this warning is happening? IE when

Generating G__RooFitCore.cxx, ../../lib/RooFitCore.pcm

@github-actions
Copy link

Test Results

    21 files      21 suites   3d 17h 10m 9s ⏱️
 3 769 tests  3 769 ✅ 0 💤 0 ❌
77 481 runs  77 481 ✅ 0 💤 0 ❌

Results for commit 4eb2e8f.

@guitargeek
Copy link
Contributor

Hi @ferdymercury, thank you very much for this! The only problem was that ROOFIT_CLAD is only defined at build time of RooFit itself. I have changed it to a new macro, R__HAS_CLAD, that is defined whenever ROOT was built with Clad support (in the style of other macros like R__HAS_COCOA, etc).

To avoid warnings about unknown pragmas, it's useful to have a
`R__HAS_CLAD` macro defined in the interpreter, so that Clad pragmas can
be conditional on Clad being available.
Copy link
Contributor

@guitargeek guitargeek left a comment

Choose a reason for hiding this comment

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

Thank you! I just had to fix it up a little: ROOFIT_CLAD -> R__HAS_CLAD, also introducing the latter macro.

@guitargeek
Copy link
Contributor

Fedora Rawhide failures are related to system upgrade and incremental build.

@guitargeek guitargeek merged commit 03f8424 into root-project:master Dec 14, 2025
27 of 28 checks passed
@ferdymercury ferdymercury deleted the patch-20 branch December 14, 2025 15:08
#ifdef __CLING__
#pragma clad checkpoint loop
#endif
#if defined(__CLING__) && defined(R__HAS_CLAD)
Copy link
Member

Choose a reason for hiding this comment

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

FYI, we define __CLAD__ which probably is what we could use here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants