@@ -28,22 +28,25 @@ endif()
2828# Find pybind11
2929find_package (pybind11 REQUIRED)
3030
31+ # Add FetchContent module
3132include (FetchContent)
33+
34+ # Declare libdivide dependency
3235FetchContent_Declare(
33- emhash
34- GIT_REPOSITORY https://github.com/DiamonDinoia/emhash.git
35- GIT_TAG master
36- GIT_SHALLOW TRUE )
37-
38- # Only populate emhash, don't build it
39- FetchContent_GetProperties(emhash)
40- if (NOT emhash_POPULATED)
41- FetchContent_Populate(emhash)
42- endif ()
36+ libdivide
37+ GIT_REPOSITORY https://github.com/ridiculousfish/libdivide
38+ GIT_TAG v5.2.0
39+ )
40+ # Make libdivide available
41+ FetchContent_MakeAvailable(libdivide)
4342
44- add_library (emhash INTERFACE )
45- target_include_directories (emhash INTERFACE ${emhash_SOURCE_DIR} )
46- target_compile_features (emhash INTERFACE cxx_std_17)
43+ FetchContent_Declare(
44+ tsl-robin-map
45+ GIT_REPOSITORY https://github.com/Tessil/robin-map.git
46+ GIT_TAG v1.4.0 # Use latest release or commit hash
47+ )
48+
49+ FetchContent_MakeAvailable(tsl-robin-map)
4750
4851# Set C++ standard
4952set (CMAKE_CXX_STANDARD 20)
@@ -66,7 +69,10 @@ pybind11_add_module(_simple_ans ${SOURCES} ${HEADERS})
6669
6770# Configure include directories
6871target_include_directories (_simple_ans PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /simple_ans/cpp)
69- target_link_libraries (_simple_ans PRIVATE emhash)
72+ target_link_libraries (_simple_ans PRIVATE libdivide tsl::robin_map)
73+
74+ # Add libdivide include directory to your target
75+ target_include_directories (_simple_ans PRIVATE ${libdivide_SOURCE_DIR} )
7076
7177# Set compiler-specific options
7278if (MSVC )
0 commit comments