Skip to content

build: third_party を submodule から FetchContent に移行 (#97 + #98)#109

Merged
thawk105 merged 2 commits into
masterfrom
p8-fetchcontent-base
May 15, 2026
Merged

build: third_party を submodule から FetchContent に移行 (#97 + #98)#109
thawk105 merged 2 commits into
masterfrom
p8-fetchcontent-base

Conversation

@thawk105

Copy link
Copy Markdown
Owner

Summary

  • third_party/{masstree,mimalloc,googletest} を tracked submodule から FetchContent ベース (cmake/ThirdParty.cmake) に移行。旧 submodule と同じ SHA / tag を pin して挙動を変えない
  • build_tools/bootstrap{,_googletest,_mimalloc}.sh.gitmodules を削除。include/masstree_wrapper.hh"../third_party/masstree/..." 形式の include を angle-bracket に整理
  • masstree は CMake project ではないので FetchContent_Populate + 旧 bootstrap 相当を add_custom_command で再現し、ccbench::masstree を INTERFACE library として expose
  • mimalloc / googletest は FetchContent_MakeAvailable で取得し、ccbench::mimalloc / GTest::gtest{,_main} を提供

Closes #97, closes #98

CI (build.yml) の submodule / bootstrap ステップ撤去と docs 更新は依存先の #99 で実施。性能 regression 検証 (#98 主目的) はユーザー指示でスキップ — v2.3.2 据え置きのためビルド / リンク確認のみ。

Test plan

  • GCC 13 (CI と同一) で Release クリーンビルド: 全 34 protocol×workload binary + replay_test.exe 成功
  • GCC 13 で Debug+ASan クリーンビルド: 成功
  • FetchContent が libkohler_masstree_json.a / libmimalloc.a / libgtest{,_main}.a を生成することを確認
  • CMake configure に warning / deprecation なし
  • CI green

thawk105 added 2 commits May 15, 2026 12:57
masstree / mimalloc / googletest を tracked submodule + 手動 bootstrap.sh から
FetchContent ベースに切り替える。

- cmake/ThirdParty.cmake を新設し、3 つの依存を SHA / tag で pin して取得:
  - masstree: thawk105 fork, commit b3c5d05 (現 submodule と同一)
  - mimalloc: v2.3.2 (commit 02a2f5d, 性能を変えないため version 据え置き)
  - googletest: commit f8d7d77 (現 submodule と同一)
- masstree は CMake project ではないので FetchContent_Populate 後に旧
  bootstrap.sh と同じ手順 (bootstrap → configure → make → ar → ranlib) を
  add_custom_command で再現し、ccbench::masstree (INTERFACE library) で
  expose する。
- mimalloc は FetchContent_MakeAvailable → upstream の mimalloc-static
  ターゲットを ccbench::mimalloc に alias。MI_BUILD_SHARED/OBJECT/TESTS は
  OFF にして余計なアーティファクトを抑える。
- googletest は FetchContent_MakeAvailable で GTest::gtest{,_main} を
  expose し、cc/ss2pl/test/CMakeLists.txt の生パス直参照を置き換える。
- include/masstree_wrapper.hh の "../third_party/masstree/..." 形式の
  include を <...> 形式に変更 (ccbench::masstree の include dir 経由で
  解決)。
- build_tools/bootstrap.sh / bootstrap_googletest.sh / bootstrap_mimalloc.sh
  と .gitmodules を削除。third_party/{masstree,mimalloc,googletest} の
  submodule entry も削除。

Closes #97, closes #98.

CI (build.yml) の submodule/bootstrap ステップ撤去と docs 更新は依存先の
#99 で行う。性能 regression 検証 (#98 の主目的) は user の明示指示により
本 PR ではスキップ — v2.3.2 を据え置いているのでビルド/リンクが通って動く
ことの確認のみ行った。
third_party は FetchContent 経由で cmake build 中に取得・ビルドされるため、
独立した bootstrap step と third_party キャッシュは不要。submodule recursive
checkout も .gitmodules 削除済みで不要。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant