From 29962c678ab36050ffce1b2849d49eaa54aef921 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 18 Feb 2014 18:14:53 +0000 Subject: [PATCH] Move xxhash to contrib. --- CMakeLists.txt | 9 +++++---- contrib/xxhash/CMakeLists.txt | 3 +++ {src/ucl/src => contrib/xxhash}/xxhash.c | 0 {src/ucl/src => contrib/xxhash}/xxhash.h | 0 debian/copyright | 2 +- src/CMakeLists.txt | 1 + src/ucl/CMakeLists.txt | 4 ++-- 7 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 contrib/xxhash/CMakeLists.txt rename {src/ucl/src => contrib/xxhash}/xxhash.c (100%) rename {src/ucl/src => contrib/xxhash}/xxhash.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fcce10f16..42ca9f4b35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -851,7 +851,8 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/src/ucl/include" "${CMAKE_SOURCE_DIR}/contrib/uthash" "${CMAKE_SOURCE_DIR}/contrib/http-parser" - "${CMAKE_SOURCE_DIR}/contrib/libottery") + "${CMAKE_SOURCE_DIR}/contrib/libottery" + "${CMAKE_SOURCE_DIR}/contrib/xxhash") SET(RSPAMDSRC src/modules.c src/controller.c @@ -887,13 +888,13 @@ IF(NOT HIREDIS_FOUND) INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/contrib/hiredis") ENDIF(NOT HIREDIS_FOUND) - +ADD_SUBDIRECTORY(contrib/xxhash) +ADD_SUBDIRECTORY(contrib/http-parser) +ADD_SUBDIRECTORY(contrib/libottery) ADD_SUBDIRECTORY(src/lua) ADD_SUBDIRECTORY(src/json) ADD_SUBDIRECTORY(src/cdb) ADD_SUBDIRECTORY(src/ucl) -ADD_SUBDIRECTORY(contrib/http-parser) -ADD_SUBDIRECTORY(contrib/libottery) ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(src/client) diff --git a/contrib/xxhash/CMakeLists.txt b/contrib/xxhash/CMakeLists.txt new file mode 100644 index 0000000000..2cc0234d86 --- /dev/null +++ b/contrib/xxhash/CMakeLists.txt @@ -0,0 +1,3 @@ +SET(XXHASHSRC xxhash.c) + +ADD_LIBRARY(xxhash STATIC ${XXHASHSRC}) \ No newline at end of file diff --git a/src/ucl/src/xxhash.c b/contrib/xxhash/xxhash.c similarity index 100% rename from src/ucl/src/xxhash.c rename to contrib/xxhash/xxhash.c diff --git a/src/ucl/src/xxhash.h b/contrib/xxhash/xxhash.h similarity index 100% rename from src/ucl/src/xxhash.h rename to contrib/xxhash/xxhash.h diff --git a/debian/copyright b/debian/copyright index 2444ed3f14..c7c185af19 100644 --- a/debian/copyright +++ b/debian/copyright @@ -42,7 +42,7 @@ Files: contrib/libottery/* Copyright: Nick Mathewson License: CC0 -Files: src/ucl/src/xxhash.* +Files: contrib/xxhash/xxhash.* Copyright: 2012-2013, Yann Collet. License: BSD-2-Clause diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 220825336a..358b130b08 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,6 +70,7 @@ TARGET_LINK_LIBRARIES(rspamd-util rspamd-ucl) TARGET_LINK_LIBRARIES(rspamd-util rspamd-ottery) TARGET_LINK_LIBRARIES(rspamd-util rspamd-http-parser) TARGET_LINK_LIBRARIES(rspamd-util event) +TARGET_LINK_LIBRARIES(rspamd-util xxhash) IF(NOT DEBIAN_BUILD) SET_TARGET_PROPERTIES(rspamd-util PROPERTIES VERSION ${RSPAMD_VERSION}) diff --git a/src/ucl/CMakeLists.txt b/src/ucl/CMakeLists.txt index cbceff4db7..e1df6890e0 100644 --- a/src/ucl/CMakeLists.txt +++ b/src/ucl/CMakeLists.txt @@ -1,13 +1,13 @@ SET(UCLSRC src/ucl_util.c src/ucl_parser.c src/ucl_emitter.c - src/ucl_hash.c - src/xxhash.c) + src/ucl_hash.c) ADD_LIBRARY(rspamd-ucl ${LINK_TYPE} ${UCLSRC}) SET_TARGET_PROPERTIES(rspamd-ucl PROPERTIES VERSION ${RSPAMD_VERSION}) SET_TARGET_PROPERTIES(rspamd-ucl PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB") +TARGET_LINK_LIBRARIES(rspamd-ucl xxhash) IF(HAVE_FETCH_H) TARGET_LINK_LIBRARIES(rspamd-ucl fetch) ELSE(HAVE_FETCH_H) -- 2.47.3