wasm: make the MAS/MKF fetch source and ref overridable - #1
Open
gpitel wants to merge 1 commit into
Open
Conversation
Building the wasm module against a fork or a local clone currently means editing
CMakeLists.txt, because _MAS_LOCAL/_MKF_LOCAL are plain set() calls that shadow
any -D on the command line. That comes up as soon as you are adding something to
MKF -- a new shape family, say -- and want the 3D module to pick it up.
Adds four cache variables, defaults unchanged (upstream MAS/MKF main):
MVBPP_MAS_REPOSITORY / MVBPP_MAS_TAG
MVBPP_MKF_REPOSITORY / MVBPP_MKF_TAG
so a fork build is now just:
emcmake cmake -S bindings/wasm -B build-wasm -G Ninja -DMVBPP_MKF_REPOSITORY=file:///path/to/MKF -DMVBPP_MKF_TAG=my-branch
Verified: configure succeeds and _deps/mkf-src is the requested branch rather
than upstream main.
FETCHCONTENT_SOURCE_DIR_MAS/_MKF is not a usable substitute, which the comment
now records: the steps after the fetch (the MAS symlink, submodule init, the
SHARED->STATIC patch) all address _deps/{mas,mkf}-src by name, so redirecting
the source elsewhere leaves them pointing at a directory that is never created.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building the wasm module against a fork or a local clone currently means editing
bindings/wasm/CMakeLists.txt, because_MAS_LOCAL/_MKF_LOCALare plainset()calls that shadow any-Don the command line.That comes up as soon as you are adding something to MKF — a new shape family, say — and want the 3D module to pick it up.
Change
Four cache variables, defaults unchanged (upstream MAS/MKF
main):MVBPP_MAS_REPOSITORY/MVBPP_MAS_TAGMVBPP_MKF_REPOSITORY/MVBPP_MKF_TAGA fork build becomes:
emcmake cmake -S bindings/wasm -B build-wasm -G Ninja \ -DMVBPP_MKF_REPOSITORY=file:///path/to/MKF \ -DMVBPP_MKF_TAG=my-branchVerified
Configure succeeds and
_deps/mkf-srcends up on the requested branch rather than upstreammain.Why not FETCHCONTENT_SOURCE_DIR
FETCHCONTENT_SOURCE_DIR_MAS/_MKFlooks like it should cover this, but it does not, and the comment now records why: the steps after the fetch — the MAS symlink, the submodule init, and theSHARED->STATICpatch — all address${CMAKE_BINARY_DIR}/_deps/{mas,mkf}-srcby name. Redirecting the source elsewhere leaves those pointing at a directory that is never created, and configure fails on the symlink step.Only
bindings/wasm/CMakeLists.txtis touched; the root CMakeLists is left alone since itsfile:///home/alf/...defaults are documented as intentional pending the MAS push.