ClickHouse/libs/libglibc-compatibility/CMakeLists.txt

44 lines
904 B
CMake
Raw Normal View History

enable_language(ASM)
include(CheckIncludeFile)
check_include_file("sys/random.h" HAVE_SYS_RANDOM_H)
2018-06-18 21:14:17 +00:00
if(COMPILER_CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-builtin-requires-header")
endif()
set(GLIBC_COMPATIBILITY_SOURCES
glibc-compatibility.c
musl/pipe2.c
musl/fallocate.c
musl/longjmp.s
musl/vasprintf.c
musl/lgamma.c
musl/posix_spawn.c
musl/futimens.c
musl/syscall.s
musl/syscall_ret.c
2018-05-11 11:54:25 +00:00
musl/sched_cpucount.c
musl/glob.c
2018-09-14 02:48:24 +00:00
musl/exp2f.c
2018-12-10 18:16:15 +00:00
musl/pwritev.c
musl/getrandom.c
musl/fcntl.c
musl/timespec_get.c
musl/sched_getcpu.c
)
2018-09-14 01:48:56 +00:00
if(HAVE_SYS_RANDOM_H)
list(APPEND GLIBC_COMPATIBILITY_SOURCES musl/getentropy.c)
endif()
if(MAKE_STATIC_LIBRARIES)
set(GLIBC_COMPATIBILITY_SOURCES ${GLIBC_COMPATIBILITY_SOURCES}
2018-09-14 01:59:05 +00:00
libcxxabi/cxa_thread_atexit.cpp)
endif()
add_library(glibc-compatibility ${GLIBC_COMPATIBILITY_SOURCES})
target_include_directories(glibc-compatibility PRIVATE libcxxabi)