-
-
Notifications
You must be signed in to change notification settings - Fork 11
Fix: 1. typo 2. wrong usage of string(REPLACE) 3. Fix CI errors 4. Bump builtin xmake to 3.0.3 #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5028581
fix(docs): Correct typos in comments
yingmanwumen 72074f3
fix(cmake): correct argument order in string(REPLACE) for compiler name
yingmanwumen 7ef6cab
fix(ci): update github actions workflows for cmake and gcc
yingmanwumen a2d6686
docs: fix typos in README and example CMakeLists
yingmanwumen 15f79a0
ci(workflows): add workflow_dispatch trigger to CI workflows
yingmanwumen 1873304
ci: upgrade CMake and GCC versions in CI workflows
yingmanwumen 97d784c
ci(workflow): Remove explicit gcc-13 installation from Linux CI
yingmanwumen 000b4be
ci(workflow): Update CMake version in CI to 3.22.0
yingmanwumen 92b3682
ci: Update CMake download paths in CI workflows
yingmanwumen 247941f
fix(zlib): Apply macOS compatibility patch
yingmanwumen 09be063
feat(zlib): Apply macOS patch version-specifically and relocate
yingmanwumen bff6488
fix(xmake): Resolve zlib_macos.patch not found issue
yingmanwumen dc5e943
refactor(xmake): use os.scriptdir instead of deprecated API
yingmanwumen d00f2f2
ci: try to fix patch path
yingmanwumen 29e29ed
ci: try to fix patch path
yingmanwumen 956858e
ci: fix zlib
yingmanwumen 020fbe6
feat(ci): add Visual Studio v144 toolset install step for Windows
yingmanwumen bb4ed5a
build: Update xmake and streamline Windows CI
yingmanwumen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this change correctly fixes the
string(REPLACE)syntax, the overall approach of parsing the compiler executable name to determine the toolchain is fragile. This method can easily break when compiler wrappers likeccacheare used (e.g.,CMAKE_CXX_COMPILER="ccache g++") or with unusually named compiler executables.A more robust approach would be to leverage CMake's built-in compiler identification variables. For example:
If preserving the version from the compiler name (e.g.,
gcc-11) is important forxrepo,CMAKE_CXX_COMPILER_VERSIONcould be appended, or a more careful regex could be used to extract it from the executable name. Relying onCMAKE_<LANG>_COMPILER_IDis generally safer than string manipulation on file paths.