Skip to content

Commit

Permalink
Include essentials library using cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteHamster committed Feb 16, 2024
1 parent bc3bf35 commit 12e1f83
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ if(NOT TARGET PTHASH)
target_compile_options(PTHASH INTERFACE -fsanitize=address -fno-omit-frame-pointer)
endif()
endif()

add_subdirectory(external/essentials)
target_link_libraries(PTHASH INTERFACE ESSENTIALS)
endif()

# Only add benchmarks and tests when compiling PTHash itself, not when added as a dependency
Expand Down
2 changes: 1 addition & 1 deletion external/essentials
2 changes: 1 addition & 1 deletion include/builders/search.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <sstream> // for stringbuf
#include <atomic> // for std::atomic
#include <vector>
#include "../../external/essentials/include/essentials.hpp"
#include <essentials.hpp>

#include "util.hpp"
#include "../encoders/bit_vector.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/encoders/bit_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "util.hpp"

#include "../../external/essentials/include/essentials.hpp"
#include <essentials.hpp>

namespace pthash {

Expand Down
2 changes: 1 addition & 1 deletion include/encoders/compact_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <vector>
#include <cmath>

#include "../../external/essentials/include/essentials.hpp"
#include <essentials.hpp>

namespace pthash {

Expand Down
2 changes: 1 addition & 1 deletion include/utils/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <chrono>
#include <string>

#include "../../external/essentials/include/essentials.hpp"
#include <essentials.hpp>
#include "../../external/fastmod/fastmod.h"

#define PTHASH_LIKELY(expr) __builtin_expect((bool)(expr), true)
Expand Down
2 changes: 1 addition & 1 deletion src/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <vector>

#include "../include/utils/util.hpp"
#include "../external/essentials/include/essentials.hpp"
#include <essentials.hpp>

namespace pthash {

Expand Down

0 comments on commit 12e1f83

Please sign in to comment.