1 cmake_minimum_required(VERSION 3.6)
4 include (CheckIncludeFileCXX)
5 check_include_file_cxx (attr/xattr.h HAVE_ATTR_XATTR_H)
6 check_include_file_cxx (sys/xattr.h HAVE_SYS_XATTR_H)
8 # Check if xattr functions take extra argument.
9 include (CheckCXXSourceCompiles)
10 CHECK_CXX_SOURCE_COMPILES ("#include <sys/types.h>
11 #include <sys/xattr.h>
12 int main() { getxattr(0,0,0,0,0,0); return 1; } " XATTR_ADD_OPT)
14 add_definitions (-D_FILE_OFFSET_BITS=64)
16 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
31 add_executable(fuse_xattrs ${SOURCE_FILES})
33 target_link_libraries (
38 install (TARGETS fuse_xattrs DESTINATION bin)
41 configure_file(run_tests.sh run_tests.sh COPYONLY)
42 configure_file(test/tests.py test/tests.py COPYONLY)
43 add_test(NAME integration