Skip to content

Commit

Permalink
Checkout submodules for HyTeg
Browse files Browse the repository at this point in the history
  • Loading branch information
vulder committed Oct 25, 2023
1 parent 0c062d3 commit 5669bd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion varats-core/varats/utils/git_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ def init_all_submodules(folder: Path) -> None:
git("-C", folder.absolute(), "submodule", "init")


def update_all_submodules(folder: Path, recursive: bool = True) -> None:
def update_all_submodules(
folder: Path, recursive: bool = True, init: bool = False
) -> None:
"""Updates all submodules."""
git_params = ["submodule", "update"]
if recursive:
git_params.append("--recursive")
if init:
git_params.append("--init")
git("-C", folder, git_params)


Expand Down
3 changes: 3 additions & 0 deletions varats/varats/projects/cpp_projects/hyteg.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from varats.project.sources import FeatureSource
from varats.project.varats_command import VCommand
from varats.project.varats_project import VProject
from varats.utils.git_commands import init_all_submodules, update_all_submodules

Check warning on line 22 in varats/varats/projects/cpp_projects/hyteg.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/projects/cpp_projects/hyteg.py#L22 <611>

Unused init_all_submodules imported from varats.utils.git_commands (unused-import)
Raw output
varats/varats/projects/cpp_projects/hyteg.py:22:0: W0611: Unused init_all_submodules imported from varats.utils.git_commands (unused-import)
from varats.utils.git_util import ShortCommitHash, RevisionBinaryMap
from varats.utils.settings import bb_cfg

Expand Down Expand Up @@ -86,6 +87,8 @@ def compile(self) -> None:

mkdir("-p", hyteg_source / "build")

update_all_submodules(hyteg_source, recursive=True, init=True)

cc_compiler = bb.compiler.cc(self)
cxx_compiler = bb.compiler.cxx(self)

Expand Down

0 comments on commit 5669bd1

Please sign in to comment.