diff options
author | Manuel Bentele | 2020-10-16 17:15:49 +0200 |
---|---|---|
committer | Manuel Bentele | 2020-10-16 17:15:49 +0200 |
commit | 969496f15e1e0359e26c2c6e995ad4ef82720f86 (patch) | |
tree | 358466216630eb10e8ee91b9ede490424f6db848 /src/shared/CMakeLists.txt | |
parent | [FUSE] turn on compiler optimization to fix warning (diff) | |
download | dnbd3-969496f15e1e0359e26c2c6e995ad4ef82720f86.tar.gz dnbd3-969496f15e1e0359e26c2c6e995ad4ef82720f86.tar.xz dnbd3-969496f15e1e0359e26c2c6e995ad4ef82720f86.zip |
[BUILD] rewrite CMake build system to track changes of source files
This change restructures the source code directories, separates shared
form non-shared application code and adds CMake dependencies. These
dependencies allow the tracking of changes and trigger a rebuild of
those build targets where changed files are involved.
WARNING: Note that the support of the DNBD3_SERVER_AFL build option is
not supported yet. Thus, the option should be never turned on.
Diffstat (limited to 'src/shared/CMakeLists.txt')
-rw-r--r-- | src/shared/CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/shared/CMakeLists.txt b/src/shared/CMakeLists.txt new file mode 100644 index 0000000..804d27c --- /dev/null +++ b/src/shared/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.10) + +# set the project name +project(dnbd3-shared) + +# add compile option to get POLLRDHUP support for signals +add_compile_options(-D_GNU_SOURCE) + +add_library(dnbd3-shared STATIC ${CMAKE_CURRENT_SOURCE_DIR}/crc32.c + ${CMAKE_CURRENT_SOURCE_DIR}/fdsignal.c + ${CMAKE_CURRENT_SOURCE_DIR}/log.c + ${CMAKE_CURRENT_SOURCE_DIR}/serialize.c + ${CMAKE_CURRENT_SOURCE_DIR}/sockhelper.c + ${CMAKE_CURRENT_SOURCE_DIR}/timing.c) +target_include_directories(dnbd3-shared PUBLIC ${PROJECT_INCLUDE_DIR}) |