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

Support compiler names with spaces #801

Open
devinamatthews opened this issue Mar 19, 2024 · 1 comment
Open

Support compiler names with spaces #801

devinamatthews opened this issue Mar 19, 2024 · 1 comment
Assignees

Comments

@devinamatthews
Copy link
Member

In some cases, especially when using autotools, the value of CC or CXX may have spaces in it. For example, in my project CXX is detected as g++ -std=c++17. Should the -std=c++17 part really be in CXXFLAGS? Absolutely, but autotools isn't going to make that easy. Other examples are mpicc -cc=clang (MPICH) or if using an absolute path with spaces.

configure doesn't seem to handle this gracefully and just takes the first word, e.g. truncating g++ -std=c++17 to g++. The correct value (with spaces) is echoed correctly by select_tool_w_env. Rather, the problem seems to be the fact that select_tool expects a space-separated list of binaries to check for, rather than a single possibly whitespace-containing name.

@devinamatthews
Copy link
Member Author

@fgvanzee I think I can come up with a reasonable solution if you'd rather not take a look.

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

2 participants