cmTarget: add std::string overloads

This commit is contained in:
Vitaly Stakhovsky
2019-12-14 09:30:00 -05:00
parent 2d53894c31
commit c34b4497f8
19 changed files with 51 additions and 52 deletions

View File

@@ -83,22 +83,21 @@ bool cmIncludeExternalMSProjectCommand(std::vector<std::string> const& args,
}
// Create a target instance for this utility.
cmTarget* target =
mf.AddNewTarget(cmStateEnums::UTILITY, utility_name.c_str());
cmTarget* target = mf.AddNewTarget(cmStateEnums::UTILITY, utility_name);
if (mf.GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
target->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
}
target->SetProperty("GENERATOR_FILE_NAME", utility_name.c_str());
target->SetProperty("EXTERNAL_MSPROJECT", path.c_str());
target->SetProperty("GENERATOR_FILE_NAME", utility_name);
target->SetProperty("EXTERNAL_MSPROJECT", path);
if (!customType.empty())
target->SetProperty("VS_PROJECT_TYPE", customType.c_str());
target->SetProperty("VS_PROJECT_TYPE", customType);
if (!platformMapping.empty())
target->SetProperty("VS_PLATFORM_MAPPING", platformMapping.c_str());
target->SetProperty("VS_PLATFORM_MAPPING", platformMapping);
for (std::string const& d : depends) {
target->AddUtility(d.c_str());
target->AddUtility(d);
}
}
#endif