summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2016-09-02 23:46:38 +0100
committerChris Wilson <chris+github@qwirx.com>2016-08-28 22:09:52 +0100
commit0560d351665313fcdd503af213118eec46930cbe (patch)
tree77f930e64e28b9d14446e2e6371b80fb85484b56
parent8c092e87b40cccc046aa4b0a215a4798548224b0 (diff)
Skip building the parts of QDBM that we don't need with CMake.
Avoids spurious compiler warnings about redefinitions of symbols in files that we don't need to link with anyway.
-rw-r--r--infrastructure/cmake/CMakeLists.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/infrastructure/cmake/CMakeLists.txt b/infrastructure/cmake/CMakeLists.txt
index 21d35e43..01405c6e 100644
--- a/infrastructure/cmake/CMakeLists.txt
+++ b/infrastructure/cmake/CMakeLists.txt
@@ -175,8 +175,17 @@ foreach(module_dep ${module_deps})
set(module_path ${base_dir}/${module_dir})
string(REPLACE "/" "_" module_name ${CMAKE_MATCH_1})
string(REPLACE "/" "_" dependencies "${CMAKE_MATCH_2}")
- file(GLOB module_files ${module_path}/*.c ${module_path}/*.cpp
- ${module_path}/*.h)
+
+ # We are replacing QDBM's normal build system, and we only want to include
+ # the modules that we actually need, to avoid warnings about duplicate
+ # definitions, and potential conflicts with Box Backup code in future, so
+ # we specify the C files to compile in explicitly.
+ if(module_name STREQUAL "qdbm")
+ file(GLOB module_files ${module_path}/depot.c ${module_path}/myconf.c)
+ else()
+ file(GLOB module_files ${module_path}/*.cpp ${module_path}/*.h)
+ endif()
+
set(module_files ${module_files} ${${module_name}_extra_files})
string(REGEX REPLACE "^ " "" dependencies "${dependencies}")