Skip to content

fix: SG-42386: Replace linux commands with CMake#1195

Open
cedrik-fuoco-adsk wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
cedrik-fuoco-adsk:SG-42386-replace-linux-commands-all-cmake
Open

fix: SG-42386: Replace linux commands with CMake#1195
cedrik-fuoco-adsk wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
cedrik-fuoco-adsk:SG-42386-replace-linux-commands-all-cmake

Conversation

@cedrik-fuoco-adsk
Copy link
Contributor

@cedrik-fuoco-adsk cedrik-fuoco-adsk commented Mar 11, 2026

Linked issues

Fixes SG-42386

Summarize your change.

Replace all Unix command-line tool dependencies (sed, bash, grep, cut, wc, cat) in the CMake build system with pure CMake implementations using a unified CMake script-mode file (apply_sed_filter.cmake) and native CMake string operations.

Describe the reason for the change.

The build system relied on Unix tools (sed, bash -c, grep, cut, wc) for text processing, which are not natively available on Windows. This prevented the build from working on Windows without additional tool installation (e.g., MSYS2/Git Bash).

Describe what you have tested and on which operating system.

I looked at the files before and after, and the files looks ok as far as I can tell.

Add a list of changes, and note any that might need special attention during the review.

If possible, provide screenshots.

@cedrik-fuoco-adsk cedrik-fuoco-adsk force-pushed the SG-42386-replace-linux-commands-all-cmake branch from ef3eb07 to 16a765b Compare March 11, 2026 14:47
@cedrik-fuoco-adsk cedrik-fuoco-adsk changed the title Sg 42386 replace linux commands all cmake fix: SG-42386: Replace linux commands all CMake Mar 11, 2026
Replace all bash+sed and Python-based text processing in the build
with a unified CMake script-mode file (apply_sed_filter.cmake).

- rv_sed.cmake: use cmake -P on all platforms instead of sed (Unix)
  or Python (Windows)
- rv_lex.cmake: replace bash-based flex version/Apple detection with
  CMake STRING operations; prefer win_flex on Windows
- rv_yacc.cmake: prefer win_bison on Windows; remove dead sed lookup
- rv_stage.cmake: replace bash pipeline for .rvpkg version extraction
  with CMake FILE(READ) + STRING(REGEX MATCH)
- MuQt5/MuQt6: use unified apply_sed_filter.cmake for SignalSpy
  patching

The CMake script handles PCRE negative lookbehinds (used in
flexfilter.sed) via a three-pass placeholder technique, and literal
replacements for yaccfilter.sed and signalspy.sed.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
@cedrik-fuoco-adsk cedrik-fuoco-adsk force-pushed the SG-42386-replace-linux-commands-all-cmake branch from 16a765b to 9c02ca7 Compare March 11, 2026 14:50
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
@cedrik-fuoco-adsk cedrik-fuoco-adsk marked this pull request as ready for review March 11, 2026 14:58
Copy link
Contributor

@bernie-laberge bernie-laberge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice !
MSYS2 days are numbered I guess !

@cedrik-fuoco-adsk cedrik-fuoco-adsk changed the title fix: SG-42386: Replace linux commands all CMake fix: SG-42386: Replace linux commands with CMake Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants