diff --git a/CMakeLists.txt b/CMakeLists.txt index 1cd76100..6aa56471 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,9 @@ cmake_minimum_required(VERSION 3.8.2) cmake_policy(PUSH) cmake_policy(VERSION 3.8.2) +if(NOT CMAKE_VERSION VERSION_LESS 3.13) + cmake_policy(SET CMP0077 NEW) +endif() if(NOT CMAKE_VERSION VERSION_LESS 3.12) cmake_policy(SET CMP0075 NEW) endif() @@ -69,10 +72,10 @@ if(NOT CMAKE_BUILD_TYPE) FORCE) endif() -macro(add_mdbx_option NAME DESCPTION DEFAULT) +macro(add_mdbx_option NAME DESCRIPTION DEFAULT) list(APPEND MDBX_BUILD_OPTIONS ${NAME}) if(NOT ${DEFAULT} STREQUAL "AUTO") - option(${NAME} "${DESCPTION}" ${DEFAULT}) + option(${NAME} "${DESCRIPTION}" ${DEFAULT}) endif() endmacro() @@ -307,7 +310,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") endif() if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") add_mdbx_option(MDBX_AVOID_CRT "Avoid dependence from MSVC CRT" ${NOT_SUBPROJECT}) - if(NOT BUILD_SHARED_LIBS) + if(NOT MDBX_BUILD_SHARED_LIBRARY) add_mdbx_option(MDBX_CONFIG_MANUAL_TLS_CALLBACK "Provide mdbx_dll_handler() for manual initialization" OFF) mark_as_advanced(MDBX_CONFIG_MANUAL_TLS_CALLBACK) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5fa99a3e..04aead5f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -194,7 +194,7 @@ endif() # options string(TIMESTAMP MDBX_BUILD_TIMESTAMP UTC) -set(options VERSION C_COMPILER CXX_COMPILER DEFINITIONS) +set(options VERSION C_COMPILER CXX_COMPILER) foreach(item IN LISTS options) if(DEFINED ${item}) set(value "${${item}}") diff --git a/src/elements/core.c b/src/elements/core.c index 4fd77a71..32a55607 100644 --- a/src/elements/core.c +++ b/src/elements/core.c @@ -16420,6 +16420,9 @@ __dll_export #endif /* MDBX_BUILD_TARGET */ #ifdef MDBX_BUILD_CONFIG +# if defined(_MSC_VER) +# pragma message("Configuration-depended MDBX_BUILD_CONFIG: " MDBX_BUILD_CONFIG) +# endif "-" MDBX_BUILD_CONFIG #endif /* MDBX_BUILD_CONFIG */ , diff --git a/src/elements/version.c.in b/src/elements/version.c.in index 65cbaf8c..2854bd5d 100644 --- a/src/elements/version.c.in +++ b/src/elements/version.c.in @@ -3,13 +3,6 @@ #include "internals.h" -#if defined(_MSC_VER) && defined(MDBX_BUILD_TARGET) -#pragma message("Configuration-depended MDBX_BUILD_TARGET: " MDBX_BUILD_TARGET) -#endif -#if defined(_MSC_VER) && defined(MDBX_BUILD_FLAGS) -#pragma message("Configuration-depended MDBX_BUILD_FLAGS: " MDBX_BUILD_FLAGS) -#endif - #if MDBX_VERSION_MAJOR != ${MDBX_VERSION_MAJOR} || \ MDBX_VERSION_MINOR != ${MDBX_VERSION_MINOR} #error "API version mismatch! Had `git fetch --tags` done?"