Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #318 from 8W9aG/bbtree-with-extras-2
Remove bbtree if not compiling using WITH_EXTRAS
  • Loading branch information
Leonid Boytsov authored and GitHub committed May 14, 2018
2 parents 71f2111 + 8bbe28a commit 63511ee
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions similarity_search/include/factory/init_methods.h
Expand Up @@ -59,8 +59,10 @@ inline void initMethods() {
REGISTER_METHOD_CREATOR(int, METH_DUMMY, CreateDummy)

// bbtree
#if WITH_EXTRAS
REGISTER_METHOD_CREATOR(float, METH_BBTREE, CreateBBTree)
REGISTER_METHOD_CREATOR(double, METH_BBTREE, CreateBBTree)
#endif

// ghtree
REGISTER_METHOD_CREATOR(float, METH_GHTREE, CreateGHTree)
Expand Down
4 changes: 4 additions & 0 deletions similarity_search/include/factory/method/bbtree.h
Expand Up @@ -15,6 +15,8 @@
#ifndef _FACTORY_BBTREE_H_
#define _FACTORY_BBTREE_H_

#if WITH_EXTRAS

#include <method/bbtree.h>

namespace similarity {
Expand All @@ -39,3 +41,5 @@ Index<dist_t>* CreateBBTree(bool PrintProgress,
}

#endif

#endif
4 changes: 4 additions & 0 deletions similarity_search/include/method/bbtree.h
Expand Up @@ -33,6 +33,8 @@
#ifndef _BBTREE_H_
#define _BBTREE_H_

#if WITH_EXTRAS

#include "index.h"
#include "params.h"

Expand Down Expand Up @@ -126,4 +128,6 @@ class BBTree : public Index<dist_t> {

} // namespace similarity

#endif

#endif // _BBTREE_H_
1 change: 1 addition & 0 deletions similarity_search/src/CMakeLists.txt
Expand Up @@ -15,6 +15,7 @@ file(GLOB SRC_FILES ${PROJECT_SOURCE_DIR}/src/*.cc ${PROJECT_SOURCE_DIR}/src/spa

if (NOT WITH_EXTRAS)
# Extra methods
list(REMOVE_ITEM SRC_FILES ${PROJECT_SOURCE_DIR}/src/method/bbtree.cc)
list(REMOVE_ITEM SRC_FILES ${PROJECT_SOURCE_DIR}/src/method/lsh.cc)
list(REMOVE_ITEM SRC_FILES ${PROJECT_SOURCE_DIR}/src/method/lsh_multiprobe.cc)
list(REMOVE_ITEM SRC_FILES ${PROJECT_SOURCE_DIR}/src/method/lsh_space.cc)
Expand Down

0 comments on commit 63511ee

Please sign in to comment.