1if(NOT (TARGET libc.src.__support.threads.mutex)) 2 # Not all platforms have a mutex implementation. If mutex is unvailable, 3 # we just skip everything about files. 4 return() 5endif() 6 7add_object_library( 8 file 9 SRCS 10 file.cpp 11 HDRS 12 file.h 13 DEPENDS 14 libc.src.__support.threads.mutex 15 libc.include.errno 16 libc.src.errno.errno 17) 18 19if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS}_file.cpp) 20 add_object_library( 21 platform_file 22 SRCS 23 ${LIBC_TARGET_OS}_file.cpp 24 DEPENDS 25 .file 26 libc.include.errno 27 libc.include.fcntl 28 libc.include.stdio 29 libc.include.sys_syscall 30 libc.src.__support.OSUtil.osutil 31 libc.src.errno.errno 32 ) 33endif() 34 35