Give the interactive cache editor the USES_TERMINAL property

This commit is contained in:
Peter Collingbourne 2014-11-05 21:39:32 +01:00 committed by Brad King
parent fe5d6e8c0f
commit 4d1fedf46e
2 changed files with 16 additions and 13 deletions

View File

@ -2207,7 +2207,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
= this->CreateGlobalTarget(this->GetPackageTargetName(), = this->CreateGlobalTarget(this->GetPackageTargetName(),
"Run CPack packaging tool...", "Run CPack packaging tool...",
&cpackCommandLines, depends, &cpackCommandLines, depends,
workingDir.c_str()); workingDir.c_str(), /*uses_terminal*/false);
} }
// CPack source // CPack source
const char* packageSourceTargetName = this->GetPackageSourceTargetName(); const char* packageSourceTargetName = this->GetPackageSourceTargetName();
@ -2231,8 +2231,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
= this->CreateGlobalTarget(packageSourceTargetName, = this->CreateGlobalTarget(packageSourceTargetName,
"Run CPack packaging tool for source...", "Run CPack packaging tool for source...",
&cpackCommandLines, depends, &cpackCommandLines, depends,
workingDir.c_str() workingDir.c_str(), /*uses_terminal*/false);
);
} }
} }
@ -2257,7 +2256,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
cpackCommandLines.push_back(singleLine); cpackCommandLines.push_back(singleLine);
(*targets)[this->GetTestTargetName()] (*targets)[this->GetTestTargetName()]
= this->CreateGlobalTarget(this->GetTestTargetName(), = this->CreateGlobalTarget(this->GetTestTargetName(),
"Running tests...", &cpackCommandLines, depends, 0); "Running tests...", &cpackCommandLines, depends, 0,
/*uses_terminal*/false);
} }
//Edit Cache //Edit Cache
@ -2280,7 +2280,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
(*targets)[editCacheTargetName] = (*targets)[editCacheTargetName] =
this->CreateGlobalTarget( this->CreateGlobalTarget(
editCacheTargetName, "Running CMake cache editor...", editCacheTargetName, "Running CMake cache editor...",
&cpackCommandLines, depends, 0); &cpackCommandLines, depends, 0, /*uses_terminal*/true);
} }
else else
{ {
@ -2293,7 +2293,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
this->CreateGlobalTarget( this->CreateGlobalTarget(
editCacheTargetName, editCacheTargetName,
"No interactive CMake dialog available...", "No interactive CMake dialog available...",
&cpackCommandLines, depends, 0); &cpackCommandLines, depends, 0, /*uses_terminal*/false);
} }
} }
@ -2312,7 +2312,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
(*targets)[rebuildCacheTargetName] = (*targets)[rebuildCacheTargetName] =
this->CreateGlobalTarget( this->CreateGlobalTarget(
rebuildCacheTargetName, "Running CMake to regenerate build system...", rebuildCacheTargetName, "Running CMake to regenerate build system...",
&cpackCommandLines, depends, 0); &cpackCommandLines, depends, 0, /*uses_terminal*/false);
} }
//Install //Install
@ -2352,7 +2352,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
(*targets)["list_install_components"] (*targets)["list_install_components"]
= this->CreateGlobalTarget("list_install_components", = this->CreateGlobalTarget("list_install_components",
ostr.str().c_str(), ostr.str().c_str(),
&cpackCommandLines, depends, 0); &cpackCommandLines, depends, 0, /*uses_terminal*/false);
} }
std::string cmd = cmakeCommand; std::string cmd = cmakeCommand;
cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.erase(cpackCommandLines.begin(),
@ -2393,7 +2393,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
(*targets)[this->GetInstallTargetName()] = (*targets)[this->GetInstallTargetName()] =
this->CreateGlobalTarget( this->CreateGlobalTarget(
this->GetInstallTargetName(), "Install the project...", this->GetInstallTargetName(), "Install the project...",
&cpackCommandLines, depends, 0); &cpackCommandLines, depends, 0, /*uses_terminal*/false);
// install_local // install_local
if(const char* install_local = this->GetInstallLocalTargetName()) if(const char* install_local = this->GetInstallLocalTargetName())
@ -2409,7 +2409,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
(*targets)[install_local] = (*targets)[install_local] =
this->CreateGlobalTarget( this->CreateGlobalTarget(
install_local, "Installing only the local directory...", install_local, "Installing only the local directory...",
&cpackCommandLines, depends, 0); &cpackCommandLines, depends, 0, /*uses_terminal*/false);
} }
// install_strip // install_strip
@ -2426,7 +2426,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
(*targets)[install_strip] = (*targets)[install_strip] =
this->CreateGlobalTarget( this->CreateGlobalTarget(
install_strip, "Installing the project stripped...", install_strip, "Installing the project stripped...",
&cpackCommandLines, depends, 0); &cpackCommandLines, depends, 0, /*uses_terminal*/false);
} }
} }
} }
@ -2500,7 +2500,8 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
const std::string& name, const char* message, const std::string& name, const char* message,
const cmCustomCommandLines* commandLines, const cmCustomCommandLines* commandLines,
std::vector<std::string> depends, std::vector<std::string> depends,
const char* workingDirectory) const char* workingDirectory,
bool uses_terminal)
{ {
// Package // Package
cmTarget target; cmTarget target;
@ -2513,6 +2514,7 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
// Store the custom command in the target. // Store the custom command in the target.
cmCustomCommand cc(0, no_outputs, no_depends, *commandLines, 0, cmCustomCommand cc(0, no_outputs, no_depends, *commandLines, 0,
workingDirectory); workingDirectory);
cc.SetUsesTerminal(uses_terminal);
target.AddPostBuildCommand(cc); target.AddPostBuildCommand(cc);
target.SetProperty("EchoString", message); target.SetProperty("EchoString", message);
std::vector<std::string>::iterator dit; std::vector<std::string>::iterator dit;

View File

@ -385,7 +385,8 @@ protected:
void CreateDefaultGlobalTargets(cmTargets* targets); void CreateDefaultGlobalTargets(cmTargets* targets);
cmTarget CreateGlobalTarget(const std::string& name, const char* message, cmTarget CreateGlobalTarget(const std::string& name, const char* message,
const cmCustomCommandLines* commandLines, const cmCustomCommandLines* commandLines,
std::vector<std::string> depends, const char* workingDir); std::vector<std::string> depends, const char* workingDir,
bool uses_terminal);
bool NeedSymbolicMark; bool NeedSymbolicMark;
bool UseLinkScript; bool UseLinkScript;