@@ -52,45 +52,13 @@ macro(mlir_configure_python_dev_packages)
52
52
find_package (nanobind 2.9 CONFIG REQUIRED)
53
53
else ()
54
54
include (FetchContent)
55
- # # nanobind uses tsl-robin-map and since we're not using GIT for nanobind we need to
56
- # # get tsl-robin-map manually too.
57
- # FetchContent_Declare(
58
- # tsl-robin-map
59
- # OVERRIDE_FIND_PACKAGE
60
- # # timestamp the files with the extraction time instead of archive time
61
- # DOWNLOAD_EXTRACT_TIMESTAMP FALSE
62
- # URL https://github.com/Tessil/robin-map/archive/refs/tags/v1.4.0.tar.gz
63
- # # put this last otherwise windows parses everything after the hash as part of the hash???
64
- # URL_HASH MD5=d56a879c94e021c55d8956e37deb3e4f
65
- # )
66
- # FetchContent_MakeAvailable(tsl-robin-map)
67
- # # Tell nanobind to use find_project(tsl-robin-map) instead of searching its
68
- # # submodule folder.
69
- # set(NB_USE_SUBMODULE_DEPS OFF CACHE INTERNAL "Switch off Nanobind submodule deps")
70
- # FetchContent_Declare(
71
- # nanobind
72
- # OVERRIDE_FIND_PACKAGE
73
- # # timestamp the files with the extraction time instead of archive time
74
- # DOWNLOAD_EXTRACT_TIMESTAMP FALSE
75
- # URL https://github.com/wjakob/nanobind/archive/refs/tags/v2.9.0.tar.gz
76
- # # put this last otherwise windows parses everything after the hash as part of the hash???
77
- # URL_HASH MD5=df0e9de9d5fd817df264584be4917fd0
78
- # )
79
- # FetchContent_MakeAvailable(nanobind)
80
55
FetchContent_Declare(
81
56
nanobind
82
57
GIT_REPOSITORY https://github.com/wjakob/nanobind.git
83
58
GIT_TAG v2.9.0
84
59
GIT_SHALLOW TRUE
85
- OVERRIDE_FIND_PACKAGE
86
60
)
87
61
FetchContent_MakeAvailable(nanobind)
88
- if (CMAKE_VERSION VERSION_LESS "3.24.0" )
89
- # OVERRIDE_FIND_PACKAGE not implemented so have to set the dirs manually.
90
- set (nanobind_DIR "${nanobind_SOURCE_DIR} /cmake" CACHE INTERNAL "" )
91
- endif ()
92
- # no PACKAGE_VERSION in this path but we know it's 2.9 of course.
93
- find_package (nanobind CONFIG REQUIRED)
94
62
endif ()
95
63
message (STATUS "Found nanobind: ${NB_DIR} " )
96
64
endif ()
0 commit comments