Skip to content

Support compiler names with spaces #801

@devinamatthews

Description

@devinamatthews

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions