[Cmake-commits] [cmake-commits] hoffman committed cmFileCommand.cxx 1.103.2.4 1.103.2.5 cmFindBase.cxx 1.35.2.2 1.35.2.3 cmGlobalGenerator.cxx 1.227.2.2 1.227.2.3 cmGlobalGenerator.h 1.107.2.1 1.107.2.2 cmInstallTargetGenerator.cxx 1.62.2.2 1.62.2.3 cmSourceFile.cxx 1.47.2.2 1.47.2.3 cmSystemTools.cxx 1.368.2.4 1.368.2.5 cmSystemTools.h 1.150.2.1 1.150.2.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu May 29 09:15:34 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv7643/Source
Modified Files:
Tag: CMake-2-6
cmFileCommand.cxx cmFindBase.cxx cmGlobalGenerator.cxx
cmGlobalGenerator.h cmInstallTargetGenerator.cxx
cmSourceFile.cxx cmSystemTools.cxx cmSystemTools.h
Log Message:
ENH: merge in changes from head for RC 3
Index: cmSystemTools.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.h,v
retrieving revision 1.150.2.1
retrieving revision 1.150.2.2
diff -C 2 -d -r1.150.2.1 -r1.150.2.2
*** cmSystemTools.h 21 Apr 2008 00:44:53 -0000 1.150.2.1
--- cmSystemTools.h 29 May 2008 13:15:32 -0000 1.150.2.2
***************
*** 49,53 ****
* Look for and replace registry values in a string
*/
! static void ExpandRegistryValues(std::string& source);
/**
--- 49,54 ----
* Look for and replace registry values in a string
*/
! static void ExpandRegistryValues(std::string& source,
! KeyWOW64 view = KeyWOW64_Default);
/**
***************
*** 392,396 ****
std::string const& oldRPath,
std::string const& newRPath,
! std::string* emsg = 0);
/** Try to remove the RPATH from an ELF binary. */
--- 393,398 ----
std::string const& oldRPath,
std::string const& newRPath,
! std::string* emsg = 0,
! bool* changed = 0);
/** Try to remove the RPATH from an ELF binary. */
Index: cmFindBase.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindBase.cxx,v
retrieving revision 1.35.2.2
retrieving revision 1.35.2.3
diff -C 2 -d -r1.35.2.2 -r1.35.2.3
*** cmFindBase.cxx 23 May 2008 20:09:36 -0000 1.35.2.2
--- cmFindBase.cxx 29 May 2008 13:15:29 -0000 1.35.2.3
***************
*** 476,479 ****
--- 476,501 ----
void cmFindBase::ExpandRegistryAndCleanPath(std::vector<std::string>& paths)
{
+ // We should view the registry as the target application would view
+ // it.
+ cmSystemTools::KeyWOW64 view = cmSystemTools::KeyWOW64_Default;
+ cmSystemTools::KeyWOW64 other_view = cmSystemTools::KeyWOW64_Default;
+ {
+ if(const char* psize =
+ this->Makefile->GetDefinition("CMAKE_SIZEOF_VOID_P"))
+ {
+ switch(atoi(psize))
+ {
+ case 4:
+ view = cmSystemTools::KeyWOW64_32;
+ other_view = cmSystemTools::KeyWOW64_64;
+ break;
+ case 8:
+ view = cmSystemTools::KeyWOW64_64;
+ other_view = cmSystemTools::KeyWOW64_32;
+ break;
+ default: break;
+ }
+ }
+ }
std::vector<std::string> finalPath;
std::vector<std::string>::iterator i;
***************
*** 483,488 ****
i != paths.end(); ++i)
{
! cmSystemTools::ExpandRegistryValues(*i);
! cmSystemTools::GlobDirs(i->c_str(), finalPath);
}
// clear the path
--- 505,519 ----
i != paths.end(); ++i)
{
! std::string expanded = *i;
! cmSystemTools::ExpandRegistryValues(expanded, view);
! cmSystemTools::GlobDirs(expanded.c_str(), finalPath);
! if(view != other_view && expanded != *i &&
! this->CMakePathName == "PROGRAM")
! {
! // Executables can be either 32-bit or 64-bit.
! expanded = *i;
! cmSystemTools::ExpandRegistryValues(expanded, other_view);
! cmSystemTools::GlobDirs(expanded.c_str(), finalPath);
! }
}
// clear the path
Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.227.2.2
retrieving revision 1.227.2.3
diff -C 2 -d -r1.227.2.2 -r1.227.2.3
*** cmGlobalGenerator.cxx 15 May 2008 19:39:54 -0000 1.227.2.2
--- cmGlobalGenerator.cxx 29 May 2008 13:15:29 -0000 1.227.2.3
***************
*** 73,86 ****
}
! for (std::map<cmStdString, std::vector<cmTargetExport*> >::iterator
! setIt = this->ExportSets.begin();
! setIt != this->ExportSets.end();
! ++setIt)
! {
! for (unsigned int i = 0; i < setIt->second.size(); ++i)
! {
! delete setIt->second[i];
! }
! }
}
--- 73,77 ----
}
! this->ClearExportSets();
}
***************
*** 684,687 ****
--- 675,679 ----
{
this->FirstTimeProgress = 0.0f;
+ this->ClearExportSets();
// Delete any existing cmLocalGenerators
unsigned int i;
***************
*** 1233,1236 ****
--- 1225,1243 ----
}
+ //----------------------------------------------------------------------------
+ void cmGlobalGenerator::ClearExportSets()
+ {
+ for(std::map<cmStdString, std::vector<cmTargetExport*> >::iterator
+ setIt = this->ExportSets.begin();
+ setIt != this->ExportSets.end(); ++setIt)
+ {
+ for(unsigned int i = 0; i < setIt->second.size(); ++i)
+ {
+ delete setIt->second[i];
+ }
+ }
+ this->ExportSets.clear();
+ }
+
const std::vector<cmTargetExport*>* cmGlobalGenerator::GetExportSet(
const char* name) const
Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.368.2.4
retrieving revision 1.368.2.5
diff -C 2 -d -r1.368.2.4 -r1.368.2.5
*** cmSystemTools.cxx 21 Apr 2008 00:44:52 -0000 1.368.2.4
--- cmSystemTools.cxx 29 May 2008 13:15:32 -0000 1.368.2.5
***************
*** 131,135 ****
// write the result into source.
#if defined(_WIN32) && !defined(__CYGWIN__)
! void cmSystemTools::ExpandRegistryValues(std::string& source)
{
// Regular expression to match anything inside [...] that begins in HKEY.
--- 131,135 ----
// write the result into source.
#if defined(_WIN32) && !defined(__CYGWIN__)
! void cmSystemTools::ExpandRegistryValues(std::string& source, KeyWOW64 view)
{
// Regular expression to match anything inside [...] that begins in HKEY.
***************
*** 147,151 ****
std::string key = regEntry.match(1);
std::string val;
! if (ReadRegistryValue(key.c_str(), val))
{
std::string reg = "[";
--- 147,151 ----
std::string key = regEntry.match(1);
std::string val;
! if (ReadRegistryValue(key.c_str(), val, view))
{
std::string reg = "[";
***************
*** 162,166 ****
}
#else
! void cmSystemTools::ExpandRegistryValues(std::string& source)
{
cmsys::RegularExpression regEntry("\\[(HKEY[^]]*)\\]");
--- 162,166 ----
}
#else
! void cmSystemTools::ExpandRegistryValues(std::string& source, KeyWOW64)
{
cmsys::RegularExpression regEntry("\\[(HKEY[^]]*)\\]");
***************
*** 2333,2339 ****
std::string const& oldRPath,
std::string const& newRPath,
! std::string* emsg)
{
#if defined(CMAKE_USE_ELF_PARSER)
unsigned long rpathPosition = 0;
unsigned long rpathSize = 0;
--- 2333,2344 ----
std::string const& oldRPath,
std::string const& newRPath,
! std::string* emsg,
! bool* changed)
{
#if defined(CMAKE_USE_ELF_PARSER)
+ if(changed)
+ {
+ *changed = false;
+ }
unsigned long rpathPosition = 0;
unsigned long rpathSize = 0;
***************
*** 2446,2449 ****
--- 2451,2458 ----
if(f)
{
+ if(changed)
+ {
+ *changed = true;
+ }
return true;
}
***************
*** 2461,2464 ****
--- 2470,2474 ----
(void)newRPath;
(void)emsg;
+ (void)changed;
return false;
#endif
Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.103.2.4
retrieving revision 1.103.2.5
diff -C 2 -d -r1.103.2.4 -r1.103.2.5
*** cmFileCommand.cxx 23 May 2008 20:09:36 -0000 1.103.2.4
--- cmFileCommand.cxx 29 May 2008 13:15:28 -0000 1.103.2.5
***************
*** 1412,1416 ****
bool have_ft = cmSystemTools::FileTimeGet(file, ft);
std::string emsg;
! if(!cmSystemTools::ChangeRPath(file, oldRPath, newRPath, &emsg))
{
cmOStringStream e;
--- 1412,1417 ----
bool have_ft = cmSystemTools::FileTimeGet(file, ft);
std::string emsg;
! bool changed;
! if(!cmSystemTools::ChangeRPath(file, oldRPath, newRPath, &emsg, &changed))
{
cmOStringStream e;
***************
*** 1423,1429 ****
success = false;
}
! if(success && have_ft)
{
! cmSystemTools::FileTimeSet(file, ft);
}
cmSystemTools::FileTimeDelete(ft);
--- 1424,1442 ----
success = false;
}
! if(success)
{
! if(changed)
! {
! std::string message = "Set runtime path of \"";
! message += file;
! message += "\" to \"";
! message += newRPath;
! message += "\"";
! this->Makefile->DisplayStatus(message.c_str(), -1);
! }
! if(have_ft)
! {
! cmSystemTools::FileTimeSet(file, ft);
! }
}
cmSystemTools::FileTimeDelete(ft);
Index: cmSourceFile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.cxx,v
retrieving revision 1.47.2.2
retrieving revision 1.47.2.3
diff -C 2 -d -r1.47.2.2 -r1.47.2.3
*** cmSourceFile.cxx 1 May 2008 16:35:40 -0000 1.47.2.2
--- cmSourceFile.cxx 29 May 2008 13:15:31 -0000 1.47.2.3
***************
*** 56,60 ****
if(this->FullPath.empty() && this->Language.empty())
{
! if(this->Location.ExtensionIsAmbiguous())
{
// Finalize the file location to get the extension and set the
--- 56,66 ----
if(this->FullPath.empty() && this->Language.empty())
{
! // If a known extension is given or a known full path is given
! // then trust that the current extension is sufficient to
! // determine the language. This will fail only if the user
! // specifies a full path to the source but leaves off the
! // extension, which is kind of weird.
! if(this->Location.ExtensionIsAmbiguous() &&
! this->Location.DirectoryIsAmbiguous())
{
// Finalize the file location to get the extension and set the
***************
*** 186,199 ****
}
- // If the user provided a full path, trust it. If the file is not
- // there the native tool will complain at build time.
- if(!this->Location.DirectoryIsAmbiguous())
- {
- this->FullPath = this->Location.GetDirectory();
- this->FullPath += "/";
- this->FullPath += this->Location.GetName();
- return true;
- }
-
cmOStringStream e;
e << "Cannot find source file \"" << this->Location.GetName() << "\"";
--- 192,195 ----
Index: cmInstallTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.cxx,v
retrieving revision 1.62.2.2
retrieving revision 1.62.2.3
diff -C 2 -d -r1.62.2.2 -r1.62.2.3
*** cmInstallTargetGenerator.cxx 21 Apr 2008 00:44:51 -0000 1.62.2.2
--- cmInstallTargetGenerator.cxx 29 May 2008 13:15:30 -0000 1.62.2.3
***************
*** 201,204 ****
--- 201,210 ----
else
{
+ // Operations done at install time on the installed file should
+ // be done on the real file and not any of the symlinks.
+ toInstallPath = this->GetInstallDestination();
+ toInstallPath += "/";
+ toInstallPath += targetNameReal;
+
files.push_back(from1);
if(targetNameReal != targetName)
Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.107.2.1
retrieving revision 1.107.2.2
diff -C 2 -d -r1.107.2.1 -r1.107.2.2
*** cmGlobalGenerator.h 15 May 2008 19:39:54 -0000 1.107.2.1
--- cmGlobalGenerator.h 29 May 2008 13:15:30 -0000 1.107.2.2
***************
*** 294,297 ****
--- 294,298 ----
// Sets of named target exports
std::map<cmStdString, std::vector<cmTargetExport*> > ExportSets;
+ void ClearExportSets();
// Manifest of all targets that will be built for each configuration.
More information about the Cmake-commits
mailing list