-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
45 lines (37 loc) · 1.05 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
44
45
cmake_minimum_required (VERSION 3.11)
set(CMAKE_CXX_STANDARD 17)
project(wcp)
option(WERROR "" OFF)
add_subdirectory(liburing)
set(WCP_COMPILER_FLAGS -Wall -pedantic -Wextra)
if (WERROR)
set(WCP_COMPILER_FLAGS ${WCP_COMPILER_FLAGS} -Werror)
endif()
add_library(wcp_lib
src/CopyRunner.cpp
src/CopyRunner.hpp
src/Assert.hpp
src/Config.hpp
src/CopyQueue.cpp
src/CopyQueue.hpp
src/QueueFileDescriptor.hpp
src/Heap.hpp
src/Heap.cpp
src/Config.cpp
src/Util.hpp
src/Util.cpp
src/wcpMain.cpp
src/wcpMain.hpp
src/QueueFileDescriptor.cpp
src/ScopedFileDescriptor.cpp
src/ScopedFileDescriptor.hpp
src/ETACalculator.hpp
src/ETACalculator.cpp)
find_package(Threads)
target_link_libraries(wcp_lib Uring ${CMAKE_THREAD_LIBS_INIT})
target_compile_options(wcp_lib PRIVATE ${WCP_COMPILER_FLAGS})
add_executable(wcp src/main.cpp)
target_link_libraries(wcp wcp_lib)
add_executable(tests src/tests.cpp src/acutest.h)
target_link_libraries(tests wcp_lib)
target_compile_options(tests PRIVATE ${WCP_COMPILER_FLAGS})