1 cmake_minimum_required(VERSION 2.8)
5 include (CheckIncludeFile)
6 check_include_file (sys/xattr.h HAVE_SYS_XATTR_H)
7 if(NOT HAVE_SYS_XATTR_H)
8 message(FATAL_ERROR "sys/xattr.h not found")
11 include (CheckCSourceCompiles)
12 check_c_source_compiles ("
13 #include <sys/types.h>
14 #include <attr/xattr.h>
15 int main() { return 1; }
17 if(NOT HAVE_ATTR_XATTR_H)
18 message(FATAL_ERROR "attr/xattr.h not found")
21 # set required definitions
22 add_definitions (-D_FILE_OFFSET_BITS=64)
24 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
26 option(ENABLE_CODECOVERAGE "Enable code coverage testing support" )
27 if(ENABLE_CODECOVERAGE)
28 include (CodeCoverage)
29 set(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
30 setup_target_for_coverage(
35 endif(ENABLE_CODECOVERAGE)
50 add_executable(fuse_xattrs ${SOURCE_FILES})
52 target_link_libraries (
57 install (TARGETS fuse_xattrs DESTINATION bin)
60 configure_file(run_tests.sh run_tests.sh COPYONLY)
61 configure_file(test/tests.py test/tests.py COPYONLY)
62 add_test(NAME integration