From ee93be501e479668b27c416522ca9282c11f0ef2 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Sun, 1 Jan 2023 17:32:57 +0100 Subject: Refactor: remove custom time.h, use _GNU_SOURCE instead --- CMakeLists.txt | 65 +--------------------------------------------------------- 1 file changed, 1 insertion(+), 64 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f24fe6f..07b2738 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,53 +33,6 @@ endif() include(CheckCSourceRuns) -check_c_source_runs( - " - #include - int main() { - struct timespec t; - (void) t.tv_sec; - (void) t.tv_nsec; - return 0; - } - " - KIT_HAVE_STRUCT_TIMESPEC -) - -check_c_source_runs( - " - #include - int main() { - return 0; - } - " - KIT_HAVE_BITS_TYPES_STRUCT_TIMESPEC_H -) - -check_c_source_runs( - " - #include - int main() { - struct timespec t; - timespec_get(&t, TIME_UTC); - return 0; - } - " - KIT_HAVE_TIMESPEC_GET -) - -check_c_source_runs( - " - #include - int main() { - struct timespec t; - clock_gettime(CLOCK_REALTIME, &t) - return 0; - } - " - KIT_HAVE_CLOCK_GETTIME -) - check_c_source_runs( " #include @@ -105,7 +58,7 @@ check_c_source_runs( check_c_source_runs( " - #include + #include int main() { return 0; } @@ -133,22 +86,6 @@ if(NOT KIT_HAVE_MALLOC) set(KIT_DISABLE_SYSTEM_MALLOC ON) endif() -if(NOT KIT_HAVE_STRUCT_TIMESPEC) - target_compile_definitions(kit PUBLIC KIT_NEED_STRUCT_TIMESPEC) -endif() - -if(KIT_HAVE_BITS_TYPES_STRUCT_TIMESPEC_H) - target_compile_definitions(kit PUBLIC KIT_HAVE_BITS_TYPES_STRUCT_TIMESPEC_H) -endif() - -if(NOT KIT_HAVE_TIMESPEC_GET) - target_compile_definitions(kit PUBLIC KIT_NEED_TIMESPEC_GET) -endif() - -if(KIT_HAVE_CLOCK_GETTIME) - target_compile_definitions(kit PUBLIC KIT_HAVE_CLOCK_GETTIME) -endif() - if(KIT_HAVE_PTHREAD_MUTEXATTR_SETTYPE) target_compile_definitions(kit PUBLIC KIT_HAVE_PTHREAD_MUTEXATTR_SETTYPE) endif() -- cgit v1.2.3