From 641261306fe0d8b294a228e9aa8e124956556ecb Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Sun, 22 May 2016 03:05:58 +0100 Subject: [PATCH] Move db locate functions to the postgresql backend lib. --- .../backends/postgresql/locate.hpp | 0 src/backends/postgresql/CMakeLists.txt | 1 + .../postgre_locate.cpp => backends/postgresql/locate.cpp} | 2 +- src/locate/CMakeLists.txt | 2 +- src/locate/main.cpp | 2 +- 5 files changed, 4 insertions(+), 3 deletions(-) rename src/locate/postgre_locate.hpp => include/backends/postgresql/locate.hpp (100%) rename src/{locate/postgre_locate.cpp => backends/postgresql/locate.cpp} (99%) diff --git a/src/locate/postgre_locate.hpp b/include/backends/postgresql/locate.hpp similarity index 100% rename from src/locate/postgre_locate.hpp rename to include/backends/postgresql/locate.hpp diff --git a/src/backends/postgresql/CMakeLists.txt b/src/backends/postgresql/CMakeLists.txt index 01e7159..0fbcaa5 100644 --- a/src/backends/postgresql/CMakeLists.txt +++ b/src/backends/postgresql/CMakeLists.txt @@ -3,6 +3,7 @@ project(${bare_name}-backend-postgresql CXX) add_library(${PROJECT_NAME} STATIC tag.cpp delete.cpp + locate.cpp ) #target_include_directories(${PROJECT_NAME} diff --git a/src/locate/postgre_locate.cpp b/src/backends/postgresql/locate.cpp similarity index 99% rename from src/locate/postgre_locate.cpp rename to src/backends/postgresql/locate.cpp index 00e0361..eb68e02 100644 --- a/src/locate/postgre_locate.cpp +++ b/src/backends/postgresql/locate.cpp @@ -15,7 +15,7 @@ * along with "dindexer". If not, see . */ -#include "postgre_locate.hpp" +#include "backends/postgresql/locate.hpp" #include "pq/connection.hpp" #include "dindexer-machinery/tiger.hpp" #include diff --git a/src/locate/CMakeLists.txt b/src/locate/CMakeLists.txt index 9b68d0f..cddde1d 100644 --- a/src/locate/CMakeLists.txt +++ b/src/locate/CMakeLists.txt @@ -3,7 +3,6 @@ project(${bare_name}-locate CXX) add_executable(${PROJECT_NAME} main.cpp commandline.cpp - postgre_locate.cpp hash.cpp ) @@ -17,6 +16,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE ${bare_name}-common PRIVATE ${bare_name}-machinery PRIVATE glob2regex + PRIVATE ${bare_name}-backend-postgresql ) string(REPLACE "${bare_name}-" "" ACTION_NAME "${PROJECT_NAME}") diff --git a/src/locate/main.cpp b/src/locate/main.cpp index 7b619c4..a30ae5f 100644 --- a/src/locate/main.cpp +++ b/src/locate/main.cpp @@ -16,7 +16,7 @@ */ #include "commandline.hpp" -#include "postgre_locate.hpp" +#include "backends/postgresql/locate.hpp" #include "dindexer-common/settings.hpp" #include "dindexer-common/split_tags.hpp" #include "dindexerConfig.h"