Skip to content

Commit bc0bbab

Browse files
fix(nemo-speech-cpp): support CMake 4
Homebrew CMake 4 rejects the old policy floor in the pinned SentencePiece helper. Select the oldest supported policy floor for the Darwin dependency build. Assisted-by: Codex:gpt-5.6 [Codex CLI]
1 parent 4feb996 commit bc0bbab

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

backend/go/nemo-speech-cpp/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,15 @@ itn: $(ITN_MARKER)
280280

281281
$(SENTENCEPIECE_MARKER): | sources/NeMo-Speech.cpp
282282
# Upstream's license copies use GNU install's -D flag, which BSD install
283-
# does not support. Create the one missing directory and use the portable
284-
# spelling before running the otherwise platform-independent script.
283+
# does not support. Homebrew CMake 4 also rejects SentencePiece's old policy
284+
# floor. Patch both incompatibilities before running the helper on Darwin.
285285
@if [ "$(shell uname -s)" = Darwin ]; then \
286286
cd sources/NeMo-Speech.cpp && \
287287
mkdir -p .deps/sentencepiece/share/licenses/nemo-speech/third_party/sentencepiece && \
288-
perl -pi -e 's/install -Dm0644/install -m 0644/g' scripts/build_sentencepiece_static.sh; \
288+
perl -pi \
289+
-e 's/install -Dm0644/install -m 0644/g;' \
290+
-e 's/-DCMAKE_BUILD_TYPE=Release /-DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 /;' \
291+
scripts/build_sentencepiece_static.sh; \
289292
fi
290293
cd sources/NeMo-Speech.cpp && JOBS=$(JOBS) scripts/build_sentencepiece_static.sh
291294

0 commit comments

Comments
 (0)