Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(macos/other): librt is not needed #24

Open
wants to merge 1 commit into
base: mariadb-4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmake/check.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ if (GALERA_HAVE_SUBUNIT_LIB)
list(APPEND GALERA_UNIT_TEST_LIBS "${GALERA_HAVE_SUBUNIT_LIB}")
endif()

# needed on old systems with glibc < 2.17 for timer_create() in libcheck.
CHECK_LIBRARY_EXISTS(rt timer_create "" HAVE_TIMER_CREATE)
IF (HAVE_TIMER_CREATE)
LIST(APPEND GALERA_UNIT_TEST_LIBS rt)
ENDIF(HAVE_TIMER_CREATE)

list(APPEND GALERA_UNIT_TEST_LIBS m)
list(APPEND GALERA_UNIT_TEST_LIBS ${GALERA_SYSTEM_LIBS})

Expand Down
4 changes: 2 additions & 2 deletions cmake/os.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#

find_library(PTHREAD_LIB pthread)
find_library(RT_LIB rt)
set(GALERA_SYSTEM_LIBS ${PTHREAD_LIB} ${RT_LIB})

set(GALERA_SYSTEM_LIBS ${PTHREAD_LIB})

if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
# Check if linkage with atomic library is needed for 8 byte atomics
Expand Down
2 changes: 1 addition & 1 deletion galerautils/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ target_compile_options(deqmap_bench
PRIVATE
-Wno-conversion)

target_link_libraries(deqmap_bench galerautilsxx rt)
target_link_libraries(deqmap_bench galerautilsxx)

#
# CRC32C micro benchmark.
Expand Down
2 changes: 1 addition & 1 deletion gcache/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ target_link_libraries(gcache galerautilsxx)

add_executable(gcache_test test.cpp)

target_link_libraries(gcache_test gcache pthread rt)
target_link_libraries(gcache_test gcache pthread)

target_compile_options(gcache_test
PRIVATE
Expand Down