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

Allow cmake to find gcc with env variable #1272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RostarMarek
Copy link
Contributor

Allows cmake to find gcc even on macOS ARM where homebrew install folder is different. By setting an enviromental variable and then fetching it arm.cmake file. If the value is not set it defaults to previous value.

I know there are probably more changes needed for local environment development on macOS ARM, but I found this fix fairly easy to do and not intrusive to previous builds so I wanted to share it this way.

I do not expect this to be merged, but based on our previous discussion I decided that this would be fairly striaghtforward way to share this.

Allows cmake to find gcc even on macOS ARM where homebrew install folder is different. By setting an enviromental variable and then fetching it arm.cmake file. If the value is not set it defaults to previous value.

Signed-off-by: RostarMarek <rostarmarek@gmail.com>
@benma benma requested a review from NickeZ August 14, 2024 19:05
Copy link
Collaborator

@NickeZ NickeZ left a comment

Choose a reason for hiding this comment

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

Looks good in general, I wrote a comment about the variable name. I like that it defaults to /usr/local.

@@ -1,10 +1,14 @@
set(CMAKE_SYSTEM_NAME "Generic")
set(CMAKE_SYSTEM_PROCESSOR "arm")

set(LOCATION_PATH $ENV{HOMEBREW_PATH})
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not a big fan of HOMEBREW_PATH in the arm.cmake file. What do you think about calling it ARMROOT or GCCROOT or something similar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure as mentioned in the opening comment, I do not expect this to get merged, just wanted to suggest a fix to a issue i found.

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