Skip to content
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

Use integer preprocessor macros for version information #627

Merged
merged 1 commit into from
May 30, 2023

Conversation

tepperly
Copy link
Member

I recommend this patch to change the HIOP_VERSION_MAJOR, HIOP_VERSION_MINOR, and HIOP_VERSION_PATCH from string to integer values. As string values, this comparison does not seem to do what I hope it would:

#if defined(LIDO_USE_IPOPT) || (defined(LIDO_USE_HIOP) && ((HIOP_VERSION_MAJOR > 0) || (HIOP_VERSION_MAJOR == 0) && ((HIOP_VERSION_MINOR > 7) || ((HIOP_VERSION_MINOR == 7) && (HIOP_VERSION_PATCH >= 1)))))

Based on what I've read, changing it to do things like HIOP_VERSION_MAJOR > "0" won't work either.

You don't really lose anything because you can change an integer value into a string using # LIDO_VERSION_MAJOR to change LIDO_VERSION_MAJOR into a string.

@cnpetra cnpetra requested review from cnpetra and nychiang May 23, 2023 22:45
@cnpetra
Copy link
Collaborator

cnpetra commented May 23, 2023

I am not opposed to using integer values and lgtm.

It does not trigger any of the CI for some strange reason. Any idea why?

@cnpetra cnpetra merged commit 594da2c into LLNL:develop May 30, 2023
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.

2 participants