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

Don't overwrite user-specified CFLAGS and CXXFLAGS #51

Merged
merged 2 commits into from
Nov 20, 2022

Conversation

ryandesign
Copy link
Contributor

While investigating a compile problem I noticed that your build was ignoring the CFLAGS and CXXFLAGS I had specified and using only its own (-Wall). This fixes it by prepending -Wall to the user flags rather than overwriting them. This allows the user to override your flags at the command line if they want to.

I also separated the C and C++ compiler checks. You were only checking if the C++ compiler is clang and using that result to decide what to do for both the C and C++ compiler. Now each is checked and handled individually.

It's possible (however unlikely) that the C++ compiler might be clang
but the C compiler might not be.
@ksherlock ksherlock merged commit b8d17f4 into ksherlock:master Nov 20, 2022
@ksherlock
Copy link
Owner

thanks

@ryandesign ryandesign deleted the patch-1 branch November 20, 2022 04:00
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