-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
43 lines (32 loc) · 1.15 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.8)
project(MyFS)
#set(CMAKE_VRBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(MOUNT
src/blockdevice.cpp
src/myfs.cpp
src/wrap.cpp
src/mount.myfs.c)
set(UNITTESTS
src/blockdevice.cpp
src/myfs.cpp
unittests/main.cpp
unittests/test-blockdevice.cpp
unittests/test-myfs.cpp
unittests/helper.cpp)
include_directories(includes)
set(COMPILE_FLAGS "-Wall -DFUSE_USE_VERSION=26")
add_definitions(${COMPILE_FLAGS})
add_executable(mount.myfs ${MOUNT})
add_executable(unittests ${UNITTESTS})
find_package(PkgConfig)
pkg_check_modules(FUSE fuse)
target_link_libraries(mount.myfs ${FUSE_LDFLAGS})
target_compile_options(mount.myfs PUBLIC ${FUSE_CFLAGS})
target_include_directories(mount.myfs PUBLIC ${FUSE_INCLUDE_DIRS})
target_link_libraries(unittests ${FUSE_LDFLAGS})
target_compile_options(unittests PUBLIC ${FUSE_CFLAGS})
target_include_directories(unittests PUBLIC ${FUSE_INCLUDE_DIRS})