Skip to content

Commit

Permalink
Add defines for OQS version components
Browse files Browse the repository at this point in the history
Signed-off-by: Douglas Stebila <[email protected]>
  • Loading branch information
dstebila committed Nov 19, 2024
1 parent 507d030 commit bd0a4ab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(OQS_VERSION_TEXT "0.11.1-dev")
set(OQS_VERSION_MAJOR 0)
set(OQS_VERSION_MINOR 11)
set(OQS_VERSION_PATCH 1)
set(OQS_VERSION_PRE_RELEASE "-dev")
set(OQS_COMPILE_BUILD_TARGET "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_HOST_SYSTEM}")
set(OQS_MINIMAL_GCC_VERSION "7.1.0")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Expand Down
4 changes: 4 additions & 0 deletions src/oqsconfig.h.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// SPDX-License-Identifier: MIT

#cmakedefine OQS_VERSION_TEXT "@OQS_VERSION_TEXT@"
#define OQS_VERSION_MAJOR @OQS_VERSION_MAJOR@
#define OQS_VERSION_MINOR @OQS_VERSION_MINOR@
#define OQS_VERSION_PATCH @OQS_VERSION_PATCH@
#define OQS_VERSION_PRE_RELEASE "@OQS_VERSION_PRE_RELEASE@"
#cmakedefine OQS_COMPILE_BUILD_TARGET "@OQS_COMPILE_BUILD_TARGET@"
#cmakedefine OQS_DIST_BUILD 1
#cmakedefine OQS_DIST_X86_64_BUILD 1
Expand Down
2 changes: 1 addition & 1 deletion tests/system_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ 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);
printf("OQS version: %s (major: %d, minor: %d, patch: %d, pre-release: %s)\n", OQS_VERSION_TEXT, OQS_VERSION_MAJOR, OQS_VERSION_MINOR, OQS_VERSION_PATCH, OQS_VERSION_PRE_RELEASE);
#if defined(OQS_COMPILE_GIT_COMMIT)
printf("Git commit: %s\n", OQS_COMPILE_GIT_COMMIT);
#endif
Expand Down

0 comments on commit bd0a4ab

Please sign in to comment.