MCPcopy Create free account
hub / github.com/Kitware/CMake / AddGlobalTarget_RebuildCache

Method AddGlobalTarget_RebuildCache

Source/cmGlobalGenerator.cxx:3142–3168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3140}
3141
3142void cmGlobalGenerator::AddGlobalTarget_RebuildCache(
3143 std::vector<GlobalTargetInfo>& targets) const
3144{
3145 char const* rebuildCacheTargetName = this->GetRebuildCacheTargetName();
3146 if (!rebuildCacheTargetName) {
3147 return;
3148 }
3149 GlobalTargetInfo gti;
3150 gti.Name = rebuildCacheTargetName;
3151 gti.Message = "Running CMake to regenerate build system...";
3152 gti.UsesTerminal = true;
3153 gti.PerConfig = cmTarget::PerConfig::No;
3154 cmCustomCommandLine singleLine;
3155 singleLine.push_back(cmSystemTools::GetCMakeCommand());
3156 singleLine.push_back("--regenerate-during-build");
3157 if (this->GetCMakeInstance()->GetIgnoreCompileWarningAsError()) {
3158 singleLine.push_back("--compile-no-warning-as-error");
3159 }
3160 if (this->GetCMakeInstance()->GetIgnoreLinkWarningAsError()) {
3161 singleLine.push_back("--link-no-warning-as-error");
3162 }
3163 singleLine.push_back("-S$(CMAKE_SOURCE_DIR)");
3164 singleLine.push_back("-B$(CMAKE_BINARY_DIR)");
3165 gti.CommandLines.push_back(std::move(singleLine));
3166 gti.StdPipesUTF8 = true;
3167 targets.push_back(std::move(gti));
3168}
3169
3170void cmGlobalGenerator::AddGlobalTarget_Install(
3171 std::vector<GlobalTargetInfo>& targets)

Callers 1

Calls 6

GetCMakeInstanceMethod · 0.95
moveFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected