mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:14:14 +08:00
mdbx: minor refine options and build-info.
Change-Id: Iadabd8524991c10e76c0d38e4eef10c65224906e
This commit is contained in:
parent
7b2034c699
commit
8de8072078
@ -37,6 +37,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.8.2)
|
cmake_minimum_required(VERSION 3.8.2)
|
||||||
cmake_policy(PUSH)
|
cmake_policy(PUSH)
|
||||||
cmake_policy(VERSION 3.8.2)
|
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)
|
if(NOT CMAKE_VERSION VERSION_LESS 3.12)
|
||||||
cmake_policy(SET CMP0075 NEW)
|
cmake_policy(SET CMP0075 NEW)
|
||||||
endif()
|
endif()
|
||||||
@ -69,10 +72,10 @@ if(NOT CMAKE_BUILD_TYPE)
|
|||||||
FORCE)
|
FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
macro(add_mdbx_option NAME DESCPTION DEFAULT)
|
macro(add_mdbx_option NAME DESCRIPTION DEFAULT)
|
||||||
list(APPEND MDBX_BUILD_OPTIONS ${NAME})
|
list(APPEND MDBX_BUILD_OPTIONS ${NAME})
|
||||||
if(NOT ${DEFAULT} STREQUAL "AUTO")
|
if(NOT ${DEFAULT} STREQUAL "AUTO")
|
||||||
option(${NAME} "${DESCPTION}" ${DEFAULT})
|
option(${NAME} "${DESCRIPTION}" ${DEFAULT})
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
@ -307,7 +310,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
|||||||
endif()
|
endif()
|
||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||||
add_mdbx_option(MDBX_AVOID_CRT "Avoid dependence from MSVC CRT" ${NOT_SUBPROJECT})
|
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
|
add_mdbx_option(MDBX_CONFIG_MANUAL_TLS_CALLBACK
|
||||||
"Provide mdbx_dll_handler() for manual initialization" OFF)
|
"Provide mdbx_dll_handler() for manual initialization" OFF)
|
||||||
mark_as_advanced(MDBX_CONFIG_MANUAL_TLS_CALLBACK)
|
mark_as_advanced(MDBX_CONFIG_MANUAL_TLS_CALLBACK)
|
||||||
|
@ -194,7 +194,7 @@ endif()
|
|||||||
|
|
||||||
# options
|
# options
|
||||||
string(TIMESTAMP MDBX_BUILD_TIMESTAMP UTC)
|
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)
|
foreach(item IN LISTS options)
|
||||||
if(DEFINED ${item})
|
if(DEFINED ${item})
|
||||||
set(value "${${item}}")
|
set(value "${${item}}")
|
||||||
|
@ -16420,6 +16420,9 @@ __dll_export
|
|||||||
#endif /* MDBX_BUILD_TARGET */
|
#endif /* MDBX_BUILD_TARGET */
|
||||||
|
|
||||||
#ifdef MDBX_BUILD_CONFIG
|
#ifdef MDBX_BUILD_CONFIG
|
||||||
|
# if defined(_MSC_VER)
|
||||||
|
# pragma message("Configuration-depended MDBX_BUILD_CONFIG: " MDBX_BUILD_CONFIG)
|
||||||
|
# endif
|
||||||
"-" MDBX_BUILD_CONFIG
|
"-" MDBX_BUILD_CONFIG
|
||||||
#endif /* MDBX_BUILD_CONFIG */
|
#endif /* MDBX_BUILD_CONFIG */
|
||||||
,
|
,
|
||||||
|
@ -3,13 +3,6 @@
|
|||||||
|
|
||||||
#include "internals.h"
|
#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} || \
|
#if MDBX_VERSION_MAJOR != ${MDBX_VERSION_MAJOR} || \
|
||||||
MDBX_VERSION_MINOR != ${MDBX_VERSION_MINOR}
|
MDBX_VERSION_MINOR != ${MDBX_VERSION_MINOR}
|
||||||
#error "API version mismatch! Had `git fetch --tags` done?"
|
#error "API version mismatch! Had `git fetch --tags` done?"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user