From 7ad03c22bd532ec58bfc350ab2df9d6f61e2e953 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 8 Jul 2018 17:44:40 -0700 Subject: [PATCH] cmake: remove -lc++experimental -ldl -lexecinfo --- CMakeLists.txt | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61430618..fee47d23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,21 +113,9 @@ set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) target_link_libraries(ccls PRIVATE Threads::Threads) -if(${CMAKE_SYSTEM_NAME} STREQUAL Darwin) - target_link_libraries(ccls PRIVATE -lc++experimental) - -elseif(${CMAKE_SYSTEM_NAME} STREQUAL Linux) - # loguru calls dladdr - target_link_libraries(ccls PRIVATE ${CMAKE_DL_LIBS}) - -elseif(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD) - # loguru::stacktrace_as_stdstring calls backtrace_symbols +if(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD) # src/platform_posix.cc uses libthr - find_package(Backtrace REQUIRED) - target_link_libraries(ccls PRIVATE ${Backtrace_LIBRARIES} thr) - if(SYSTEM_CLANG) - target_link_libraries(ccls PRIVATE c++experimental) - endif() + target_link_libraries(ccls PRIVATE thr) endif() ### Definitions