mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-10 00:10:19 +03:00
Fixes already accepted in upstream repo Closes: https://bugs.gentoo.org/962546 Signed-off-by: Yongxiang Liang <tanekliang@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/43758 Closes: https://github.com/gentoo/gentoo/pull/43758 Signed-off-by: Sam James <sam@gentoo.org>
23 lines
864 B
Diff
23 lines
864 B
Diff
https://github.com/fcitx/libime/commit/39ced92b4450f49b03e38bdd6a58d1f1b9430824
|
|
|
|
fix odr: build kenlm with C++20
|
|
|
|
--- a/src/libime/core/CMakeLists.txt
|
|
+++ b/src/libime/core/CMakeLists.txt
|
|
@@ -14,9 +14,14 @@ target_include_directories(kenlm PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE
|
|
target_compile_definitions(kenlm PUBLIC -DKENLM_MAX_ORDER=3 PRIVATE -DNDEBUG)
|
|
target_link_libraries(kenlm PUBLIC Boost::boost PkgConfig::ZSTD)
|
|
set_target_properties(kenlm PROPERTIES
|
|
- CXX_STANDARD 11
|
|
POSITION_INDEPENDENT_CODE ON)
|
|
|
|
+include(CheckCXXSymbolExists)
|
|
+check_cxx_symbol_exists(_LIBCPP_VERSION version LIBCPP)
|
|
+if(LIBCPP)
|
|
+ target_compile_definitions(kenlm PUBLIC -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
|
|
+endif()
|
|
+
|
|
if(UNIX)
|
|
check_library_exists(rt clock_gettime "clock_gettime from librt" HAVE_CLOCKGETTIME_RT)
|
|
if (HAVE_CLOCKGETTIME_RT)
|