Skip to content
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

Fix cmake syntax in generate_version_txt.cmake. #96

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

statham-arm
Copy link
Contributor

Commit 23f1d75 included $(LLVM_TOOLCHAIN_C_LIBRARY), which isn't valid cmake syntax – to interpolate a cmake variable you have to use braces, not parentheses.

This led to a mysterious error from git

fatal: cannot change to 'rev-parse': No such file or directory

because once ${base_library} is set to something that doesn't make sense, git -C ${${base_library}_SOURCE_DIR} rev-parse HEAD substitutes nothing at all for the source directory, and the command collapses to just git -C rev-parse which indeed interprets rev-parse as the directory to change into.

Commit 23f1d75 included `$(LLVM_TOOLCHAIN_C_LIBRARY)`, which
isn't valid cmake syntax – to interpolate a cmake variable you have to
use braces, not parentheses.

This led to a mysterious error from git

fatal: cannot change to 'rev-parse': No such file or directory

because once `${base_library}` is set to something that doesn't make
sense, `git -C ${${base_library}_SOURCE_DIR} rev-parse HEAD`
substitutes nothing at all for the source directory, and the command
collapses to just `git -C rev-parse` which indeed interprets
`rev-parse` as the directory to change into.
Copy link
Contributor

@pratlucas pratlucas left a comment

Choose a reason for hiding this comment

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

LGTM.

@statham-arm statham-arm merged commit 5daa268 into arm:arm-software Feb 17, 2025
@statham-arm statham-arm deleted the version-txt-syntax-fix branch February 17, 2025 12:02
pratlucas pushed a commit to pratlucas/arm-toolchain that referenced this pull request Feb 28, 2025
Commit 23f1d75 included `$(LLVM_TOOLCHAIN_C_LIBRARY)`, which
isn't valid cmake syntax – to interpolate a cmake variable you have to
use braces, not parentheses.

This led to a mysterious error from git

fatal: cannot change to 'rev-parse': No such file or directory

because once `${base_library}` is set to something that doesn't make
sense, `git -C ${${base_library}_SOURCE_DIR} rev-parse HEAD` substitutes
nothing at all for the source directory, and the command collapses to
just `git -C rev-parse` which indeed interprets `rev-parse` as the
directory to change into.
pratlucas pushed a commit that referenced this pull request Feb 28, 2025
Commit 23f1d75 included `$(LLVM_TOOLCHAIN_C_LIBRARY)`, which
isn't valid cmake syntax – to interpolate a cmake variable you have to
use braces, not parentheses.

This led to a mysterious error from git

fatal: cannot change to 'rev-parse': No such file or directory

because once `${base_library}` is set to something that doesn't make
sense, `git -C ${${base_library}_SOURCE_DIR} rev-parse HEAD` substitutes
nothing at all for the source directory, and the command collapses to
just `git -C rev-parse` which indeed interprets `rev-parse` as the
directory to change into.
@pratlucas pratlucas mentioned this pull request Feb 28, 2025
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.

2 participants