mdbx: minor refine options and build-info.

Change-Id: Iadabd8524991c10e76c0d38e4eef10c65224906e
This commit is contained in:
Leonid Yuriev 2019-10-24 16:40:40 +03:00
parent 7b2034c699
commit 8de8072078
4 changed files with 10 additions and 11 deletions

View File

@ -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)

View File

@ -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}}")

View File

@ -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 */
,

View File

@ -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?"