mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 22:47:16 +08:00
mdbx-cmake: add MDBX_MANAGE_BUILD_FLAGS
build-time option.
This commit is contained in:
parent
c06d072daf
commit
a44eb1accb
@ -233,6 +233,7 @@ if(SUBPROJECT)
|
|||||||
if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
|
if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
|
||||||
option(CMAKE_POSITION_INDEPENDENT_CODE "Generate position independent (PIC)" ON)
|
option(CMAKE_POSITION_INDEPENDENT_CODE "Generate position independent (PIC)" ON)
|
||||||
endif()
|
endif()
|
||||||
|
set(MDBX_MANAGE_BUILD_FLAGS_DEFAULT OFF)
|
||||||
else()
|
else()
|
||||||
option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)" ON)
|
option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)" ON)
|
||||||
option(CMAKE_POSITION_INDEPENDENT_CODE "Generate position independent (PIC)" ON)
|
option(CMAKE_POSITION_INDEPENDENT_CODE "Generate position independent (PIC)" ON)
|
||||||
@ -341,9 +342,14 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif(NOT MDBX_AMALGAMATED_SOURCE)
|
endif(NOT MDBX_AMALGAMATED_SOURCE)
|
||||||
|
|
||||||
setup_compile_flags()
|
set(MDBX_MANAGE_BUILD_FLAGS_DEFAULT ON)
|
||||||
endif(SUBPROJECT)
|
endif(SUBPROJECT)
|
||||||
|
|
||||||
|
option(MDBX_MANAGE_BUILD_FLAGS "Allow libmdbx to configure/manage/override its own build flags" ${MDBX_MANAGE_BUILD_FLAGS_DEFAULT})
|
||||||
|
if(MDBX_MANAGE_BUILD_FLAGS)
|
||||||
|
setup_compile_flags()
|
||||||
|
endif()
|
||||||
|
|
||||||
list(FIND CMAKE_C_COMPILE_FEATURES c_std_11 HAS_C11)
|
list(FIND CMAKE_C_COMPILE_FEATURES c_std_11 HAS_C11)
|
||||||
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_11 HAS_CXX11)
|
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_11 HAS_CXX11)
|
||||||
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_14 HAS_CXX14)
|
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_14 HAS_CXX14)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user