mdbx-cmake: add workaround for LCC 1.25 bug of class inline static constexpr member field definition.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-04-05 18:34:37 +03:00
parent 437cd0d3d7
commit c9dfb7d8c2
2 changed files with 8 additions and 0 deletions

View File

@ -613,6 +613,10 @@ macro(libmdbx_setup_libs TARGET MODE)
target_link_libraries(${TARGET} ${MODE} log)
endif()
if(LIBCXX_FILESYSTEM AND MDBX_BUILD_CXX)
if(CMAKE_COMPILER_IS_ELBRUSCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 1.26.0
AND NOT CMAKE_VERSION VERSION_LESS 3.13)
target_link_options(${TARGET} PUBLIC "-Wl,--allow-multiple-definition")
endif()
target_link_libraries(${TARGET} PUBLIC ${LIBCXX_FILESYSTEM})
endif()
endmacro()

View File

@ -46,6 +46,10 @@ set_target_properties(mdbx_test PROPERTIES
target_setup_options(mdbx_test)
if(NOT MDBX_BUILD_CXX AND LIBCXX_FILESYSTEM)
if(CMAKE_COMPILER_IS_ELBRUSCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 1.26.0
AND NOT CMAKE_VERSION VERSION_LESS 3.13)
target_link_options(mdbx_test PRIVATE "-Wl,--allow-multiple-definition")
endif()
target_link_libraries(mdbx_test ${LIBCXX_FILESYSTEM})
endif()