open-quantum-safe / liboqs

C library for prototyping and experimenting with quantum-resistant cryptography
https://openquantumsafe.org/
Other
1.92k stars 466 forks source link

Add defines for OQS version components #2000

Closed dstebila closed 3 days ago

dstebila commented 1 week ago

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 commented 5 days ago

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.