-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake errors on switch file with STAB3 and only one of ST4, ST3 #1082
Comments
@camilleanne Thanks for reporting and documenting this! I think your assessment is spot on, this is a bug, and either This should be an easy fix of the logic though, in the switches.json file you pointed to, assuming no side effects that might not be obvious yet. I'll start on testing that fix. @JessicaMeixner-NOAA is back Monday, and I have some leave next week, so likely she can pick up with what I have. I see a timeline of getting something submitted & approved likely end of next week, or early the following. Monday we will have a better idea of timing. |
@camilleanne I have fix that I believe corrects the build w.r.t. |
Fyi @camilleanne, the PR was submitted. I'm on leave now till friday. @JessicaMeixner-NOAA will handle the review from here. |
fyi @camilleanne. Thanks for your patience! |
Describe the bug
When building with cmake, if the switch file includes
STAB3
thenST3
andST4
are both required, but it should allow just one.To Reproduce
Steps to reproduce the behavior.
If you have a switch file that includes
STAB3 ST4
and follow the cmake instructionscmake .. -DSWITCH=/path/to/switch_CMAKE_TEST
you'll see the error:error: Switch 'STAB3' requires 'ST3' to be set
enumerated combinations:
switch file includes:
STAB3 ST4
error:
Switch 'STAB3' requires 'ST3' to be set
switch file includes:
STAB3 ST3
error:
Switch 'STAB3' requires 'ST4' to be set
switch file includes:
STAB3 ST4 ST3
error:
No valid sterm switches found, but one is required
switch file includes:
ST4 ST3
error:
No valid sterm switches found, but one is required
switch file includes:
ST4
error: none
switch file includes:
ST3
error: none
Expected behavior
I expect that either
ST3
orST4
would be required to be used withSTAB3
, not that both are required. I have no sense about whether it's appropriate to use both together withSTAB3
, but know that our use case only requiresSTAB3
andST4
.The manual asserts either
ST3
orST4
can be used withSTAB3
, implying that both are not required:This is corroborated by the older build_utils logic.
Additional context
I believe this behavior originates from this line in switches.json.
The text was updated successfully, but these errors were encountered: