File: useOurHopscotchMap.patch

package info (click to toggle)
xxsds-dynamic 1.0~alpha.1%2Bgit20210426.548c6f7-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 544 kB
  • sloc: cpp: 7,844; makefile: 8
file content (61 lines) | stat: -rw-r--r-- 2,454 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Author: Steffen Moeller <moeller@debian.org>, Nilesh Patra <nilesh@debian.org>
Last-Update: Sat, 18 Jul 2020 16:40:45 +0200
Description: Use Debian packaged hopscotch_map
Forwarded: not-needed
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 3.6)
 
 option(USE_OPENMP "Enable multi-threading" OFF)
 
@@ -14,24 +14,15 @@
 
 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/")
+set(PRIVATE tsl::hopscotch_map_INCLUDE "/usr/include/tsl")
 
 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(${INSTALL_DIR}/src/PRIVATE tsl::hopscotch_map/include)
+find_package(tsl-hopscotch-map REQUIRED)
 
 message("Building in ${CMAKE_BUILD_TYPE} mode")
 
@@ -56,12 +47,11 @@
 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)
-
+target_link_libraries(debug PRIVATE tsl::hopscotch_map)
+target_link_libraries(rle_lz77_v1 PRIVATE tsl::hopscotch_map)
+target_link_libraries(rle_lz77_v2 PRIVATE tsl::hopscotch_map)
+target_link_libraries(h0_lz77 PRIVATE tsl::hopscotch_map)
+target_link_libraries(rle_bwt PRIVATE tsl::hopscotch_map)
+target_link_libraries(cw-bwt PRIVATE tsl::hopscotch_map)
+target_link_libraries(benchmark PRIVATE tsl::hopscotch_map)
+target_link_libraries(wm_string PRIVATE tsl::hopscotch_map)