Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It's a much cleaner build system with a clear syntax and simple configuration. Using cmake flags, we can control precisely which extra components we build (examples, unit-tests, benchmarks, etc). Split benchmarks into specific-benchmarks (the old ones) and universal-benchmark (the new one)
- Loading branch information
Showing
71 changed files
with
2,589 additions
and
1,955 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
cmake_minimum_required(VERSION 2.8.7) | ||
project(libcuckoo LANGUAGES CXX) | ||
set (libcuckoo_VERSION_MAJOR 0) | ||
set (libcuckoo_VERSION_MINOR 1) | ||
|
||
# Add the libcuckoo interface target | ||
add_subdirectory(libcuckoo) | ||
|
||
# Build examples | ||
if(BUILD_EXAMPLES) | ||
add_subdirectory(examples) | ||
endif() | ||
|
||
# Build tests -- this only builds tests that were specified | ||
add_subdirectory(tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
add_subdirectory(cityhash) | ||
|
||
add_executable(nested_table nested_table.cc) | ||
target_link_libraries(nested_table libcuckoo) | ||
|
||
add_executable(hellohash hellohash.cc) | ||
target_link_libraries(hellohash libcuckoo cityhash) | ||
|
||
add_executable(count_freq count_freq.cc) | ||
target_link_libraries(count_freq libcuckoo cityhash) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Run configure to generate the config.h file | ||
execute_process(COMMAND cmake -E chdir ${CMAKE_CURRENT_SOURCE_DIR} | ||
${CMAKE_CURRENT_SOURCE_DIR}/configure) | ||
|
||
# Add the current directory as an interface library to include | ||
add_library(cityhash_config INTERFACE) | ||
target_include_directories(cityhash_config INTERFACE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
) | ||
|
||
# The src subdirectory contains the actual library definition | ||
add_subdirectory(src) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
add_library(cityhash city.cc city.h) | ||
target_link_libraries(cityhash cityhash_config) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
add_library(libcuckoo INTERFACE) | ||
|
||
# Include relative to the base directory | ||
target_include_directories(libcuckoo INTERFACE | ||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:include> | ||
) | ||
|
||
# Enable C++11 for all targets that link with libcuckoo | ||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
target_compile_options(libcuckoo INTERFACE -std=c++11 -stdlib=libc++) | ||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") | ||
target_compile_options(libcuckoo INTERFACE -std=gnu++11) | ||
endif() | ||
|
||
|
||
install( | ||
FILES | ||
city_hasher.hh | ||
cuckoohash_config.hh | ||
cuckoohash_map.hh | ||
cuckoohash_util.hh | ||
lazy_array.hh | ||
DESTINATION | ||
${CMAKE_INSTALL_PREFIX}/include/libcuckoo | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.