mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 06:09:52 -06:00
cmGlobalGenerator: add a method to make an output-formatted string
This is needed to inject arguments through flag generation mechanisms so that they can all be unescaped uniformly. Eventually, these methods should go away and the escape/unescape dance be avoided completely.
This commit is contained in:
@@ -594,6 +594,18 @@ public:
|
||||
virtual bool SupportsCrossConfigs() const { return false; }
|
||||
virtual bool SupportsDefaultConfigs() const { return false; }
|
||||
|
||||
virtual std::string ConvertToOutputPath(std::string path) const
|
||||
{
|
||||
return path;
|
||||
}
|
||||
virtual std::string GetConfigDirectory(std::string const& config) const
|
||||
{
|
||||
if (!this->IsMultiConfig() || config.empty()) {
|
||||
return {};
|
||||
}
|
||||
return cmStrCat('/', config);
|
||||
}
|
||||
|
||||
static std::string EscapeJSON(const std::string& s);
|
||||
|
||||
void ProcessEvaluationFiles();
|
||||
|
||||
@@ -3149,6 +3149,11 @@ bool cmGlobalNinjaGenerator::IsSingleConfigUtility(
|
||||
!this->PerConfigUtilityTargets.count(target->GetName());
|
||||
}
|
||||
|
||||
std::string cmGlobalNinjaGenerator::ConvertToOutputPath(std::string path) const
|
||||
{
|
||||
return this->ConvertToNinjaPath(path);
|
||||
}
|
||||
|
||||
const char* cmGlobalNinjaMultiGenerator::NINJA_COMMON_FILE =
|
||||
"CMakeFiles/common.ninja";
|
||||
const char* cmGlobalNinjaMultiGenerator::NINJA_FILE_EXTENSION = ".ninja";
|
||||
|
||||
@@ -484,6 +484,8 @@ public:
|
||||
|
||||
bool CheckCxxModuleSupport(CxxModuleSupportQuery query) override;
|
||||
|
||||
std::string ConvertToOutputPath(std::string path) const override;
|
||||
|
||||
protected:
|
||||
std::vector<std::string> const& GetConfigNames() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user