[Cmake-commits] [cmake-commits] hoffman committed cmGlobalGenerator.cxx 1.242 1.243 cmGlobalGenerator.h 1.114 1.115
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Oct 1 09:50:14 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv27868/Source
Modified Files:
cmGlobalGenerator.cxx cmGlobalGenerator.h
Log Message:
BUG: fix for 7738, allow for spaces in the package target path to CPackConfig files
Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.114
retrieving revision 1.115
diff -C 2 -d -r1.114 -r1.115
*** cmGlobalGenerator.h 22 Sep 2008 14:56:48 -0000 1.114
--- cmGlobalGenerator.h 1 Oct 2008 13:50:11 -0000 1.115
***************
*** 281,285 ****
cmTarget CreateGlobalTarget(const char* name, const char* message,
const cmCustomCommandLines* commandLines,
! std::vector<std::string> depends, bool depends_on_all = false);
bool NeedSymbolicMark;
--- 281,286 ----
cmTarget CreateGlobalTarget(const char* name, const char* message,
const cmCustomCommandLines* commandLines,
! std::vector<std::string> depends, const char* workingDir,
! bool depends_on_all = false);
bool NeedSymbolicMark;
Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.242
retrieving revision 1.243
diff -C 2 -d -r1.242 -r1.243
*** cmGlobalGenerator.cxx 22 Sep 2008 14:56:48 -0000 1.242
--- cmGlobalGenerator.cxx 1 Oct 2008 13:50:11 -0000 1.243
***************
*** 1560,1563 ****
--- 1560,1564 ----
// CPack
+ std::string workingDir = mf->GetStartOutputDirectory();
cmCustomCommandLines cpackCommandLines;
std::vector<std::string> depends;
***************
*** 1572,1576 ****
std::string configFile = mf->GetStartOutputDirectory();;
configFile += "/CPackConfig.cmake";
! singleLine.push_back(configFile);
cpackCommandLines.push_back(singleLine);
if ( this->GetPreinstallTargetName() )
--- 1573,1578 ----
std::string configFile = mf->GetStartOutputDirectory();;
configFile += "/CPackConfig.cmake";
! std::string relConfigFile = "./CPackConfig.cmake";
! singleLine.push_back(relConfigFile);
cpackCommandLines.push_back(singleLine);
if ( this->GetPreinstallTargetName() )
***************
*** 1592,1596 ****
= this->CreateGlobalTarget(this->GetPackageTargetName(),
"Run CPack packaging tool...",
! &cpackCommandLines, depends);
}
// CPack source
--- 1594,1599 ----
= this->CreateGlobalTarget(this->GetPackageTargetName(),
"Run CPack packaging tool...",
! &cpackCommandLines, depends,
! workingDir.c_str());
}
// CPack source
***************
*** 1604,1609 ****
singleLine.push_back(this->GetCMakeInstance()->GetCPackCommand());
singleLine.push_back("--config");
! configFile = mf->GetStartOutputDirectory();;
! configFile += "/CPackSourceConfig.cmake";
if(cmSystemTools::FileExists(configFile.c_str()))
{
--- 1607,1614 ----
singleLine.push_back(this->GetCMakeInstance()->GetCPackCommand());
singleLine.push_back("--config");
! std::string configFile = mf->GetStartOutputDirectory();;
! configFile += "/CPackSourceCConfig.cmake";
! std::string relConfigFile = "./CPackSourceConfig.cmake";
! singleLine.push_back(relConfigFile);
if(cmSystemTools::FileExists(configFile.c_str()))
{
***************
*** 1613,1617 ****
= this->CreateGlobalTarget(packageSourceTargetName,
"Run CPack packaging tool for source...",
! &cpackCommandLines, depends);
}
}
--- 1618,1624 ----
= this->CreateGlobalTarget(packageSourceTargetName,
"Run CPack packaging tool for source...",
! &cpackCommandLines, depends,
! workingDir.c_str()
! );
}
}
***************
*** 1638,1642 ****
(*targets)[this->GetTestTargetName()]
= this->CreateGlobalTarget(this->GetTestTargetName(),
! "Running tests...", &cpackCommandLines, depends);
}
--- 1645,1649 ----
(*targets)[this->GetTestTargetName()]
= this->CreateGlobalTarget(this->GetTestTargetName(),
! "Running tests...", &cpackCommandLines, depends, 0);
}
***************
*** 1661,1665 ****
this->CreateGlobalTarget(
editCacheTargetName, "Running CMake cache editor...",
! &cpackCommandLines, depends);
}
else
--- 1668,1672 ----
this->CreateGlobalTarget(
editCacheTargetName, "Running CMake cache editor...",
! &cpackCommandLines, depends, 0);
}
else
***************
*** 1673,1677 ****
editCacheTargetName,
"Running interactive CMake command-line interface...",
! &cpackCommandLines, depends);
}
}
--- 1680,1684 ----
editCacheTargetName,
"Running interactive CMake command-line interface...",
! &cpackCommandLines, depends, 0);
}
}
***************
*** 1692,1696 ****
this->CreateGlobalTarget(
rebuildCacheTargetName, "Running CMake to regenerate build system...",
! &cpackCommandLines, depends);
}
--- 1699,1703 ----
this->CreateGlobalTarget(
rebuildCacheTargetName, "Running CMake to regenerate build system...",
! &cpackCommandLines, depends, 0);
}
***************
*** 1725,1729 ****
= this->CreateGlobalTarget("list_install_components",
ostr.str().c_str(),
! &cpackCommandLines, depends);
}
std::string cmd;
--- 1732,1736 ----
= this->CreateGlobalTarget("list_install_components",
ostr.str().c_str(),
! &cpackCommandLines, depends, 0);
}
std::string cmd;
***************
*** 1774,1778 ****
this->CreateGlobalTarget(
this->GetInstallTargetName(), "Install the project...",
! &cpackCommandLines, depends);
// install_local
--- 1781,1785 ----
this->CreateGlobalTarget(
this->GetInstallTargetName(), "Install the project...",
! &cpackCommandLines, depends, 0);
// install_local
***************
*** 1790,1794 ****
this->CreateGlobalTarget(
install_local, "Installing only the local directory...",
! &cpackCommandLines, depends);
}
--- 1797,1801 ----
this->CreateGlobalTarget(
install_local, "Installing only the local directory...",
! &cpackCommandLines, depends, 0);
}
***************
*** 1807,1811 ****
this->CreateGlobalTarget(
install_strip, "Installing the project stripped...",
! &cpackCommandLines, depends);
}
}
--- 1814,1818 ----
this->CreateGlobalTarget(
install_strip, "Installing the project stripped...",
! &cpackCommandLines, depends, 0);
}
}
***************
*** 1816,1819 ****
--- 1823,1827 ----
const cmCustomCommandLines* commandLines,
std::vector<std::string> depends,
+ const char* workingDirectory,
bool depends_on_all /* = false */)
{
***************
*** 1827,1831 ****
std::vector<std::string> no_depends;
// Store the custom command in the target.
! cmCustomCommand cc(no_outputs, no_depends, *commandLines, 0, 0);
target.GetPostBuildCommands().push_back(cc);
target.SetProperty("EchoString", message);
--- 1835,1840 ----
std::vector<std::string> no_depends;
// Store the custom command in the target.
! cmCustomCommand cc(no_outputs, no_depends, *commandLines, 0,
! workingDirectory);
target.GetPostBuildCommands().push_back(cc);
target.SetProperty("EchoString", message);
More information about the Cmake-commits
mailing list