Skip to content

Commit f10e8a7

Browse files
committed
folly: switch to FetchContent
1 parent a429733 commit f10e8a7

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[submodule "extern/drgn"]
22
path = extern/drgn
33
url = https://github.com/ajor/drgn.git
4-
[submodule "extern/folly"]
5-
path = extern/folly
6-
url = https://github.com/JakeHillion/folly.git

CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,16 @@ add_custom_target(librocksdb ALL
112112
)
113113
include_directories(SYSTEM "${rocksdb_SOURCE_DIR}/include")
114114

115+
### folly
116+
### use folly as a header only library. some features won't be supported.
117+
FetchContent_Declare(
118+
folly
119+
GIT_REPOSITORY https://github.com/JakeHillion/folly.git
120+
GIT_TAG 8db54418e3ccdd97619ac8b69bb3702f82bb0f66
121+
)
122+
FetchContent_Populate(folly)
123+
include_directories(SYSTEM ${folly_SOURCE_DIR})
124+
115125
### bison & flex (for oid_parser)
116126
find_package(BISON 3.5 REQUIRED)
117127
find_package(FLEX)
@@ -147,10 +157,6 @@ find_package(msgpack REQUIRED CONFIG)
147157
get_target_property(MSGPACK_INCLUDE_DIRS msgpackc INTERFACE_INCLUDE_DIRECTORIES)
148158
include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
149159

150-
### folly
151-
### use folly as a header only library. some features won't be supported.
152-
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/extern/folly)
153-
154160
### zstd (for rocksdb)
155161
find_package(zstd REQUIRED)
156162

extern/folly

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/ci.oid.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ containers = [
4545

4646
[headers]
4747
user_paths = [
48-
"../extern/folly",
48+
"_deps/folly-src", # this path might be flaky, but it's unlikely to change
4949
]
5050
system_paths = [
5151
"/usr/include/c++/11",

0 commit comments

Comments
 (0)