Cmake: fix link of some tests (missing pthread)

This commit is contained in:
proller 2017-11-27 23:39:06 +03:00
parent 269c2cea92
commit 4b63d9a4c3
3 changed files with 5 additions and 3 deletions

View File

@ -158,7 +158,7 @@ if (CMAKE_SYSTEM MATCHES "Linux" AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
option (USE_LIBCXX "Use libc++ and libc++abi instead of libstdc++ (only make sense on Linux with Clang)" ${HAVE_LIBCXX})
if (USE_LIBCXX)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") # Ok for clang6, for older can cause 'not used option' worning
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") # Ok for clang6, for older can cause 'not used option' warning
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_LIBCPP_DEBUG=1") # More checks in debug build.
if (MAKE_STATIC_LIBRARIES)
link_libraries (-Wl,-Bstatic -stdlib=libc++ c++ c++abi -Wl,-Bdynamic)

View File

@ -11,7 +11,8 @@ target_link_libraries (field dbms)
add_executable (move_field move_field.cpp)
target_link_libraries (move_field clickhouse_common_io)
add_executable (rvo_test rvo_test.cpp)
add_executable (rvo_test OArvo_test.cpp)
target_link_libraries (rvo_test Threads::Threads)
add_executable (string_ref_hash string_ref_hash.cpp)
target_link_libraries (string_ref_hash clickhouse_common_io)

View File

@ -1,3 +1,4 @@
find_package (Threads)
add_executable (clickhouse-compressor main.cpp)
target_link_libraries (clickhouse-compressor clickhouse-compressor-lib)
@ -5,4 +6,4 @@ target_link_libraries (clickhouse-compressor clickhouse-compressor-lib)
install (TARGETS clickhouse-compressor RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse-compressor)
add_executable (zstd_test zstd_test.cpp)
target_link_libraries (zstd_test ${ZSTD_LIBRARY})
target_link_libraries (zstd_test ${ZSTD_LIBRARY} Threads::Threads)