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

Use nanosleep if available #209

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ include(CheckFunctionExists)
check_function_exists(longjmp HAVE_LONGJMP)
check_function_exists(siglongjmp HAVE_SIGLONGJMP)
check_function_exists(clock_nanosleep HAVE_CLOCK_NANOSLEEP)
check_function_exists(nanosleep HAVE_NANOSLEEP)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/include/config.h
Expand Down Expand Up @@ -120,6 +121,9 @@ if(CMAKE_VERSION VERSION_LESS "3.12")
if(HAVE_CLOCK_NANOSLEEP)
add_definitions(-DHAVE_CLOCK_NANOSLEEP)
endif()
if(HAVE_NANOSLEEP)
add_definitions(-DHAVE_NANOSLEEP)
endif()
if(HAVE_SSM)
add_definitions(-DHAVE_SSM)
endif()
Expand All @@ -133,6 +137,9 @@ else()
if(HAVE_CLOCK_NANOSLEEP)
add_compile_definitions(HAVE_CLOCK_NANOSLEEP)
endif()
if(HAVE_NANOSLEEP)
add_compile_definitions(HAVE_NANOSLEEP)
endif()
if(HAVE_SSM)
add_compile_definitions(HAVE_SSM)
endif()
Expand Down