diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bddc9553..6c386d24b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/oqsconfig.h.cmake b/src/oqsconfig.h.cmake index dae1babad..00013d4cf 100644 --- a/src/oqsconfig.h.cmake +++ b/src/oqsconfig.h.cmake @@ -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 diff --git a/tests/system_info.c b/tests/system_info.c index 248d377cd..b16815dc8 100644 --- a/tests/system_info.c +++ b/tests/system_info.c @@ -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