Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build #9

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,34 @@ project(${PROJECT_NAME})
option(WITH_ASAN ON)
option(DISKHASH_TESTS ON)

include(setup)
set(CXX_FLAGS
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
)

include_directories(${CMAKE_SOURCE_DIR}/src)
add_library(diskhash STATIC src/os_wrappers.c src/diskhash.c)

file(GLOB HDR_FILES ${CMAKE_SOURCE_DIR}/src/*.h*)
set_target_properties(diskhash PROPERTIES PUBLIC_HEADER "${HDR_FILES}")

install(TARGETS diskhash
EXPORT diskhashTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
PUBLIC_HEADER DESTINATION include/diskhash
)

install(EXPORT diskhashTargets
FILE diskhashConfig.cmake
DESTINATION lib/cmake/diskhash
)

if(DISKHASH_TESTS)
include_directories(${CMAKE_SOURCE_DIR}/unittests)

Expand Down
10 changes: 0 additions & 10 deletions cmake-modules/setup.cmake

This file was deleted.

2 changes: 2 additions & 0 deletions src/diskhash_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <utility>
#include <algorithm>
#include <memory>
#include <limits>

namespace dht {

Expand Down Expand Up @@ -114,6 +115,7 @@ struct DiskHash<T>::iterator {
}
// There is no other available return for dht_indexed_lookup ().
assert (false);
return 0;
}
};

Expand Down