From 36aba9517ce80d0a50abb376235fca1185f4b42d Mon Sep 17 00:00:00 2001 From: deliciouslytyped <47436522+deliciouslytyped@users.noreply.github.com> Date: Wed, 7 Jul 2021 23:04:01 +0200 Subject: [PATCH] Move hopscotch_map to a submodule and update CMakeLists.txt --- .gitmodules | 3 +++ CMakeLists.txt | 24 +----------------------- deps/hopscotch_map | 1 + 3 files changed, 5 insertions(+), 23 deletions(-) create mode 100644 .gitmodules create mode 160000 deps/hopscotch_map diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9022e3f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "deps/hopscotch_map"] + path = deps/hopscotch_map + url = https://github.com/Tessil/hopscotch-map.git diff --git a/CMakeLists.txt b/CMakeLists.txt index f2a41c2..f5b335b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,24 +14,12 @@ project (dynamic) include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) -# hopscotch_map -ExternalProject_Add(hopscotch_map - GIT_REPOSITORY "https://github.com/Tessil/hopscotch-map.git" - BUILD_IN_SOURCE TRUE - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR} # TODO ADD static build flag - UPDATE_COMMAND "" - INSTALL_COMMAND "" - BUILD_COMMAND "" - CONFIGURE_COMMAND "") -ExternalProject_Get_property(hopscotch_map INSTALL_DIR) -set(hopscotch_map_INCLUDE "${INSTALL_DIR}/src/hopscotch_map/include/") - include_directories(${PROJECT_SOURCE_DIR}/include) #include_directories(${PROJECT_SOURCE_DIR}/include/dynamic) #include_directories(${PROJECT_SOURCE_DIR}/include/dynamic/internal) #include_directories(${PROJECT_SOURCE_DIR}/include/dynamic/algorithms) #include_directories(${PROJECT_SOURCE_DIR}/include/dynamic/algorithms/cw-bwt) -include_directories(${INSTALL_DIR}/src/hopscotch_map/include) +include_directories(${CMAKE_SOURCE_DIR}/deps/hopscotch_map/include) message("Building in ${CMAKE_BUILD_TYPE} mode") @@ -55,13 +43,3 @@ add_executable(rle_bwt rle_bwt.cpp) add_executable(cw-bwt cw-bwt.cpp) add_executable(benchmark benchmark.cpp) add_executable(wm_string wm_string.cpp) - -add_dependencies(debug hopscotch_map) -add_dependencies(rle_lz77_v1 hopscotch_map) -add_dependencies(rle_lz77_v2 hopscotch_map) -add_dependencies(h0_lz77 hopscotch_map) -add_dependencies(rle_bwt hopscotch_map) -add_dependencies(cw-bwt hopscotch_map) -add_dependencies(benchmark hopscotch_map) -add_dependencies(wm_string hopscotch_map) - diff --git a/deps/hopscotch_map b/deps/hopscotch_map new file mode 160000 index 0000000..8483747 --- /dev/null +++ b/deps/hopscotch_map @@ -0,0 +1 @@ +Subproject commit 848374746a50b3ebebe656611d554cb134e9aeef