summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2014-11-05 20:39:32 (GMT)
committerBrad King <brad.king@kitware.com>2014-11-14 16:56:33 (GMT)
commit4d1fedf46e9cbdb388728c9a986cbf89db810c73 (patch)
tree75c9832ec48008941b4064e7430fe40ceef6ac8d /Source
parentfe5d6e8c0f2e37bac0621a3b976d95c471891f38 (diff)
downloadCMake-4d1fedf46e9cbdb388728c9a986cbf89db810c73.zip
CMake-4d1fedf46e9cbdb388728c9a986cbf89db810c73.tar.gz
CMake-4d1fedf46e9cbdb388728c9a986cbf89db810c73.tar.bz2
Give the interactive cache editor the USES_TERMINAL property
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx26
-rw-r--r--Source/cmGlobalGenerator.h3
2 files changed, 16 insertions, 13 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 5a3c238..4d49fe3 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2207,7 +2207,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
= this->CreateGlobalTarget(this->GetPackageTargetName(),
"Run CPack packaging tool...",
&cpackCommandLines, depends,
- workingDir.c_str());
+ workingDir.c_str(), /*uses_terminal*/false);
}
// CPack source
const char* packageSourceTargetName = this->GetPackageSourceTargetName();
@@ -2231,8 +2231,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
= this->CreateGlobalTarget(packageSourceTargetName,
"Run CPack packaging tool for source...",
&cpackCommandLines, depends,
- workingDir.c_str()
- );
+ workingDir.c_str(), /*uses_terminal*/false);
}
}
@@ -2257,7 +2256,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
cpackCommandLines.push_back(singleLine);
(*targets)[this->GetTestTargetName()]
= this->CreateGlobalTarget(this->GetTestTargetName(),
- "Running tests...", &cpackCommandLines, depends, 0);
+ "Running tests...", &cpackCommandLines, depends, 0,
+ /*uses_terminal*/false);
}
//Edit Cache
@@ -2280,7 +2280,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
(*targets)[editCacheTargetName] =
this->CreateGlobalTarget(
editCacheTargetName, "Running CMake cache editor...",
- &cpackCommandLines, depends, 0);
+ &cpackCommandLines, depends, 0, /*uses_terminal*/true);
}
else
{
@@ -2293,7 +2293,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
this->CreateGlobalTarget(
editCacheTargetName,
"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] =
this->CreateGlobalTarget(
rebuildCacheTargetName, "Running CMake to regenerate build system...",
- &cpackCommandLines, depends, 0);
+ &cpackCommandLines, depends, 0, /*uses_terminal*/false);
}
//Install
@@ -2352,7 +2352,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
(*targets)["list_install_components"]
= this->CreateGlobalTarget("list_install_components",
ostr.str().c_str(),
- &cpackCommandLines, depends, 0);
+ &cpackCommandLines, depends, 0, /*uses_terminal*/false);
}
std::string cmd = cmakeCommand;
cpackCommandLines.erase(cpackCommandLines.begin(),
@@ -2393,7 +2393,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
(*targets)[this->GetInstallTargetName()] =
this->CreateGlobalTarget(
this->GetInstallTargetName(), "Install the project...",
- &cpackCommandLines, depends, 0);
+ &cpackCommandLines, depends, 0, /*uses_terminal*/false);
// install_local
if(const char* install_local = this->GetInstallLocalTargetName())
@@ -2409,7 +2409,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
(*targets)[install_local] =
this->CreateGlobalTarget(
install_local, "Installing only the local directory...",
- &cpackCommandLines, depends, 0);
+ &cpackCommandLines, depends, 0, /*uses_terminal*/false);
}
// install_strip
@@ -2426,7 +2426,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
(*targets)[install_strip] =
this->CreateGlobalTarget(
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 cmCustomCommandLines* commandLines,
std::vector<std::string> depends,
- const char* workingDirectory)
+ const char* workingDirectory,
+ bool uses_terminal)
{
// Package
cmTarget target;
@@ -2513,6 +2514,7 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
// Store the custom command in the target.
cmCustomCommand cc(0, no_outputs, no_depends, *commandLines, 0,
workingDirectory);
+ cc.SetUsesTerminal(uses_terminal);
target.AddPostBuildCommand(cc);
target.SetProperty("EchoString", message);
std::vector<std::string>::iterator dit;
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 8a10d38..926efe7 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -385,7 +385,8 @@ protected:
void CreateDefaultGlobalTargets(cmTargets* targets);
cmTarget CreateGlobalTarget(const std::string& name, const char* message,
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 UseLinkScript;