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

Add defines for OQS version components #2000

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

dstebila
Copy link
Member

Fixes #1993.

Note that I had to use #define rather than #cmakedefine in oqsconfig.h.cmake to avoid it not setting the macros when the values are equal to a false-y value like 0 or "".

@dstebila dstebila added this to the 0.12.0 milestone Nov 19, 2024
@dstebila dstebila self-assigned this Nov 19, 2024
CMakeLists.txt Outdated Show resolved Hide resolved
src/oqsconfig.h.cmake Outdated Show resolved Hide resolved
tests/system_info.c Show resolved Hide resolved
Copy link
Member

@baentsch baentsch left a comment

Choose a reason for hiding this comment

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

I'd think it'd be prudent document (progression and change logic of) these defines somewhere such as for users to know what they can rely on (e.g., is "OQS_VERSION_PRE_RELEASE" undefined an indication of a release?). Unsure where to best place it, though: Maybe in "CONFIGURE.md" or as comment atop "oqs.h"?

@@ -219,7 +219,11 @@ static void print_oqs_configuration(void) {
* USE_SANITIZER: -fsanitize= option present in compile options
* OQS_ENABLE_TEST_CONSTANT_TIME: only shown below
*/
printf("OQS version: %s\n", OQS_VERSION_TEXT);
#if defined(OQS_VERSION_PRE_RELEASE)
Copy link
Member

Choose a reason for hiding this comment

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

Is the idea to completely drop this define when doing a release then? Or if just setting an empty pre-release string is that equal to!defined? Maybe worth while adding proposed wording for the changes to the Release wiki in the comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've updated the release wiki to explain what's going on here. I don't have an opinion one way or the other whether it is better for OQS_VERSION_PRE_RELEASE to be defined-but-empty or undefined for releases.

@dstebila
Copy link
Member Author

I'd think it'd be prudent document (progression and change logic of) these defines somewhere such as for users to know what they can rely on (e.g., is "OQS_VERSION_PRE_RELEASE" undefined an indication of a release?). Unsure where to best place it, though: Maybe in "CONFIGURE.md" or as comment atop "oqs.h"?

I've now added documentation comments in oqsconfig.h.cmake, which then get copied into the generated oqsconfig.h.

dstebila and others added 4 commits November 24, 2024 11:22
Co-authored-by: Spencer Wilson <[email protected]>
Signed-off-by: Douglas Stebila <[email protected]>
Signed-off-by: Douglas Stebila <[email protected]>
Co-authored-by: Spencer Wilson <[email protected]>
Signed-off-by: Douglas Stebila <[email protected]>
Signed-off-by: Douglas Stebila <[email protected]>
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.

Create version #defines
3 participants