From b84c31fb15eef778093f97eccf69bce29da7f987 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Fri, 15 Jul 2016 17:12:40 +0100 Subject: [PATCH] Buildfix on travis. Don't include incredis when not needed, or cmake will look for hiredis. Install hiredis and enable redis backend explicitly. --- .travis.yml | 3 ++- CMakeLists.txt | 11 +++++++++-- README.md | 16 ++++++++++------ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 188a2b2..3ecbf0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: cpp script: - mkdir build - cd build - - cmake -DBUILD_TESTING=ON -DDINDEXER_WITH_BUILD_DATE=on -DPBL_WITH_TESTS=off -DDINDEXER_WITH_NICE_MEDIA_TYPES=on .. + - cmake -DBUILD_TESTING=ON -DDINDEXER_WITH_BUILD_DATE=on -DPBL_WITH_TESTS=off -DDINDEXER_WITH_NICE_MEDIA_TYPES=on -DDINDEXER_ENABLED_BACKENDS=postgresql,redis .. - cmake --build . - ctest - cpack @@ -23,6 +23,7 @@ gcc_deps: &gcc_deps - libpq-dev - libpq5 - rpm + - hiredis-dev sources: - ubuntu-toolchain-r-test diff --git a/CMakeLists.txt b/CMakeLists.txt index c9b1531..18567b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,7 +109,6 @@ target_include_directories(${bare_name}-inc INTERFACE ${CMAKE_SOURCE_DIR}/include ) - if (NOT DINDEXER_CXX11_ABI AND CMAKE_CXX_COMPILER_VERSION_MAJOR EQUAL "5") message(STATUS "CXX11 ABI disabled (_GLIBCXX_USE_CXX11_ABI=0)") add_definitions( @@ -122,6 +121,12 @@ if (NOT DINDEXER_CXX11_ABI AND CMAKE_CXX_COMPILER_VERSION_MAJOR EQUAL "5") ) endif() +list(FIND DINDEXER_ENABLED_BACKENDS "redis" redis_found_index) +if (${redis_found_index} GREATER -1) + set(DINDEXER_WITH_REDIS ON) +endif() +unset(redis_found_index) + #Libraries add_subdirectory(src/pq) add_subdirectory(src/common) @@ -131,7 +136,9 @@ add_subdirectory(lib/glob2regex) add_subdirectory(src/backends) add_subdirectory(src/core) add_shared_git_project(lib/duckhandy) -add_shared_git_project(lib/incredis EXCLUDE_FROM_ALL) +if (DINDEXER_WITH_REDIS) + add_shared_git_project(lib/incredis EXCLUDE_FROM_ALL) +endif() #Actions add_subdirectory(src/main) diff --git a/README.md b/README.md index 11fff34..2df6ecb 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Latest stable release is __0.1.5b__. [![dindexer on Diaspora*](http://i.imgur.com/DcBZykA.png)](https://mondiaspora.net/tags/dindexer) Follow [my posts on Diaspora](https://mondiaspora.net/tags/dindexer) for the latest development news and to post your comments about the project. +_CLONING FASTER_: This project uses flat_git. Just run `ruby tools/flat_git.rb ` instead of `git submodule init` and you should be good to go. More info [in the wiki](https://github.com/KingDuckZ/dindexer/wiki/flat_git) + ## What is dindexer? ## ### Purpose ### dindexer (from "Disc Indexer") is a program to help you keep track of where your files are as you back them up on external media. It's like updatedb/locate, but it's designed for never changing removable media, such as DVDs and BluRays. @@ -37,12 +39,14 @@ As dindexer needs to write data to a PostgreSQL database, you need to configure %YAML 1.2 --- - db_settings: - username: bob_db - password: my_secret_db_password - dbname: dindexerdb - port: 5432 - address: 127.0.0.1 + backend_name: postgresql + postgresql_settings: + connection: + username: bob_db + password: my_secret_db_password + dbname: dindexerdb + port: 5432 + address: 127.0.0.1 ## Actions ## Actions are just executable files located in a directory that is searched by dindexer. dindexer will list available actions when invoked with no parameters.