Component names are arbitrary strings, so non-alphanumeric characters
must be dealt with.
void Component::create_build_info()
{
BuildInfo final_build_info;
- final_build_info.defines[toupper(name)+"_BUILD"] = "1";
+ string build_macro = toupper(name)+"_BUILD";
+ for(char &c: build_macro)
+ if(!isalnum(static_cast<unsigned char>(c)))
+ c = '_';
+ final_build_info.defines[build_macro] = "1";
const Package::Requirements &pkg_reqs = package.get_required_packages();
Package::Requirements direct_reqs = requires;