osquery-1/osquery/filesystem/CMakeLists.txt
yying 5f81cd9e2b Filesystem Abstractions - Code and Unit Tests (#2119)
* Implemented filesystem operations abstraction code
* Added filesystem operations abstraction unit tests
* Modified CMake configurations to support the building of the abstraction code and unit tests
2016-05-31 12:20:38 -07:00

32 lines
805 B
CMake

if(APPLE)
ADD_OSQUERY_OBJCXX_LIBRARY(TRUE osquery_filesystem_objc
darwin/plist.mm
)
ADD_OSQUERY_LINK(TRUE "-framework Foundation")
elseif(FREEBSD)
elseif(LINUX)
ADD_OSQUERY_LIBRARY(TRUE osquery_filesystem_linux
linux/mem.cpp
linux/proc.cpp
)
endif()
file(GLOB OS_FILEOPS_SOURCE "${PROCESS_FAMILY}/*.cpp")
ADD_OSQUERY_LIBRARY(TRUE osquery_filesystem
filesystem.cpp
${OS_FILEOPS_SOURCE}
)
file(GLOB OSQUERY_FILESYSTEM_TESTS "tests/*.cpp")
ADD_OSQUERY_TEST(TRUE ${OSQUERY_FILESYSTEM_TESTS})
if(APPLE)
file(GLOB OSQUERY_DARWIN_FILESYSTEM_TESTS "darwin/tests/*.cpp")
ADD_OSQUERY_TEST(TRUE ${OSQUERY_DARWIN_FILESYSTEM_TESTS})
file(GLOB OSQUERY_DARWIN_FILESYSTEM_BENCHMARKS "darwin/benchmarks/*.cpp")
ADD_OSQUERY_BENCHMARK(${OSQUERY_DARWIN_FILESYSTEM_BENCHMARKS})
endif()