|
@@ -1395,12 +1395,16 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
|
|
singleLine.erase(singleLine.begin(), singleLine.end());
|
|
singleLine.erase(singleLine.begin(), singleLine.end());
|
|
|
depends.erase(depends.begin(), depends.end());
|
|
depends.erase(depends.begin(), depends.end());
|
|
|
singleLine.push_back(this->GetCMakeInstance()->GetCTestCommand());
|
|
singleLine.push_back(this->GetCMakeInstance()->GetCTestCommand());
|
|
|
|
|
+ singleLine.push_back("--force-new-ctest-process");
|
|
|
if(cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.')
|
|
if(cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.')
|
|
|
{
|
|
{
|
|
|
singleLine.push_back("-C");
|
|
singleLine.push_back("-C");
|
|
|
singleLine.push_back(mf->GetDefinition("CMAKE_CFG_INTDIR"));
|
|
singleLine.push_back(mf->GetDefinition("CMAKE_CFG_INTDIR"));
|
|
|
}
|
|
}
|
|
|
- singleLine.push_back("--force-new-ctest-process");
|
|
|
|
|
|
|
+ else // TODO: This is a hack. Should be something to do with the generator
|
|
|
|
|
+ {
|
|
|
|
|
+ singleLine.push_back("$(ARGS)");
|
|
|
|
|
+ }
|
|
|
cpackCommandLines.push_back(singleLine);
|
|
cpackCommandLines.push_back(singleLine);
|
|
|
(*targets)[this->GetTestTargetName()]
|
|
(*targets)[this->GetTestTargetName()]
|
|
|
= this->CreateGlobalTarget(this->GetTestTargetName(),
|
|
= this->CreateGlobalTarget(this->GetTestTargetName(),
|
|
@@ -1464,9 +1468,40 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
|
|
//Install
|
|
//Install
|
|
|
if(this->InstallTargetEnabled)
|
|
if(this->InstallTargetEnabled)
|
|
|
{
|
|
{
|
|
|
|
|
+ if(!cmakeCfgIntDir || !*cmakeCfgIntDir || cmakeCfgIntDir[0] == '.')
|
|
|
|
|
+ {
|
|
|
|
|
+ std::set<cmStdString>* componentsSet
|
|
|
|
|
+ = this->GetCMakeInstance()->GetInstallComponents();
|
|
|
|
|
+ cpackCommandLines.erase(cpackCommandLines.begin(),
|
|
|
|
|
+ cpackCommandLines.end());
|
|
|
|
|
+ depends.erase(depends.begin(), depends.end());
|
|
|
|
|
+ cmOStringStream ostr;
|
|
|
|
|
+ if ( componentsSet->size() > 0 )
|
|
|
|
|
+ {
|
|
|
|
|
+ ostr << "Available install components are:";
|
|
|
|
|
+ std::set<cmStdString>::iterator it;
|
|
|
|
|
+ for (
|
|
|
|
|
+ it = componentsSet->begin();
|
|
|
|
|
+ it != componentsSet->end();
|
|
|
|
|
+ ++ it )
|
|
|
|
|
+ {
|
|
|
|
|
+ ostr << " \"" << it->c_str() << "\"";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ ostr << "Only default component available";
|
|
|
|
|
+ }
|
|
|
|
|
+ singleLine.push_back(ostr.str().c_str());
|
|
|
|
|
+ //cpackCommandLines.push_back(singleLine);
|
|
|
|
|
+ (*targets)["list_install_components"]
|
|
|
|
|
+ = this->CreateGlobalTarget("list_install_components",
|
|
|
|
|
+ ostr.str().c_str(),
|
|
|
|
|
+ &cpackCommandLines, depends);
|
|
|
|
|
+ }
|
|
|
std::string cmd;
|
|
std::string cmd;
|
|
|
cpackCommandLines.erase(cpackCommandLines.begin(),
|
|
cpackCommandLines.erase(cpackCommandLines.begin(),
|
|
|
- cpackCommandLines.end());
|
|
|
|
|
|
|
+ cpackCommandLines.end());
|
|
|
singleLine.erase(singleLine.begin(), singleLine.end());
|
|
singleLine.erase(singleLine.begin(), singleLine.end());
|
|
|
depends.erase(depends.begin(), depends.end());
|
|
depends.erase(depends.begin(), depends.end());
|
|
|
if ( this->GetPreinstallTargetName() )
|
|
if ( this->GetPreinstallTargetName() )
|
|
@@ -1518,7 +1553,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
|
|
{
|
|
{
|
|
|
singleLine.insert(singleLine.begin()+1, "-DCMAKE_INSTALL_LOCAL_ONLY=1");
|
|
singleLine.insert(singleLine.begin()+1, "-DCMAKE_INSTALL_LOCAL_ONLY=1");
|
|
|
cpackCommandLines.erase(cpackCommandLines.begin(),
|
|
cpackCommandLines.erase(cpackCommandLines.begin(),
|
|
|
- cpackCommandLines.end());
|
|
|
|
|
|
|
+ cpackCommandLines.end());
|
|
|
cpackCommandLines.push_back(singleLine);
|
|
cpackCommandLines.push_back(singleLine);
|
|
|
|
|
|
|
|
(*targets)[install_local] =
|
|
(*targets)[install_local] =
|