Skip to content

Commit 1be5cf0

Browse files
committed
std::chrono::steady_clock doesn't need clock_gettime on macOS, so use clock_gettime from librt only on other unix systems
1 parent 78ec0f3 commit 1be5cf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@ target_compile_definitions(lslobj PRIVATE
185185
)
186186

187187
# platform specific configuration
188-
if(UNIX)
188+
if(UNIX AND NOT APPLE)
189189
include(CheckSymbolExists)
190190
# check that clock_gettime is present in the stdlib, link against librt otherwise
191191
check_symbol_exists(clock_gettime time.h HAS_GETTIME)
192192
if(NOT HAS_GETTIME)
193193
target_link_libraries(lslobj PRIVATE rt)
194194
endif()
195-
if(LSL_DEBUGLOG AND NOT APPLE)
195+
if(LSL_DEBUGLOG)
196196
target_link_libraries(lslobj PRIVATE dl)
197197
endif()
198198
elseif(WIN32)

0 commit comments

Comments
 (0)