Skip to content

IAR: Tolerate variables named for languages

Joakim Lönnberg requested to merge jlonnberg/cmake:master into master

If a project or user sets a variable or cache entry named C or CXX, we were previously comparing those language names to the value of that variable, rather than the name itself. Double-quote the string to take advantage of policy CMP0054, but also add "x" prefixes to support projects that do not set the policy.

This extends a similar fix from !6243 (merged).

Original Description Creating a project with mixed sources (C/C++) fails to set up the compiler flags properly. Quoting the lang flag seems to make the comparison always work.

Topic-rename: iar-lang-vars

Edited by Brad King

Merge request reports