Skip to content

Fetching polyscope brings in 325MB #403

Description

@alecjacobson

I'm using

FetchContent_Declare(
   polyscope
   GIT_REPOSITORY https://github.com/nmwsharp/polyscope.git
   GIT_TAG        v2.6.1
   # shallow
   GIT_SHALLOW    TRUE
)

But GIT_SHALLOW doesn't do much here because of all the submodules (257MB).

Claude recommended:

FetchContent_Declare(
   polyscope
   GIT_REPOSITORY https://github.com/nmwsharp/polyscope.git
   GIT_TAG        v2.6.1
   GIT_SHALLOW    TRUE
   GIT_SUBMODULES ""
)

FetchContent_GetProperties(polyscope)
if(NOT polyscope_POPULATED)
  FetchContent_Populate(polyscope)
  execute_process(
    COMMAND git submodule update --init --recursive --depth 1
    WORKING_DIRECTORY ${polyscope_SOURCE_DIR}
    COMMAND_ERROR_IS_FATAL ANY
  )
  add_subdirectory(${polyscope_SOURCE_DIR} ${polyscope_BINARY_DIR})
endif()

Which brings the total down to 81MB and hopefully isn't missing anything.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions