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

Flag logic in CMake is faulty #204

Open
zerothi opened this issue Nov 8, 2023 · 0 comments
Open

Flag logic in CMake is faulty #204

zerothi opened this issue Nov 8, 2023 · 0 comments

Comments

@zerothi
Copy link

zerothi commented Nov 8, 2023

One basically can't add flags on the command line in release mode since you overwrite everything.

Please don't overwrite CXX_FLAGS when users want to point to dependent libraries in other directories.

For instance:

CXXFLAGS="-I<some path>" cmake -DCMAKE_CXX_FLAGS="-I<some path>" -H. -Bbuild

will neglect all flags...

I would advice you to not mingle with the CMAKE_CXX_FLAGS, or at least always append stuff if you really want to.

Altogether I would suggest you avoid the hard-coding to some extent as it means one cannot build your project with other compilers than GNU.

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

No branches or pull requests

1 participant