[Cmake-commits] [cmake-commits] hoffman committed cmGlobalGenerator.h 1.122 1.123 cmGlobalVisualStudioGenerator.h 1.9 1.10 cmLocalGenerator.cxx 1.303 1.304 cmMakefile.cxx 1.512 1.513
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Jul 17 10:05:56 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv15822
Modified Files:
cmGlobalGenerator.h cmGlobalVisualStudioGenerator.h
cmLocalGenerator.cxx cmMakefile.cxx
Log Message:
ENH: make sure GUIDs for filters are cached
Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.122
retrieving revision 1.123
diff -C 2 -d -r1.122 -r1.123
*** cmGlobalGenerator.h 10 Jul 2009 20:51:43 -0000 1.122
--- cmGlobalGenerator.h 17 Jul 2009 14:05:52 -0000 1.123
***************
*** 260,264 ****
{
return this->BinaryDirectories.insert(dir).second;
! }
protected:
--- 260,266 ----
{
return this->BinaryDirectories.insert(dir).second;
! }
! /** Supported systems creates a GUID for the given name */
! virtual void CreateGUID(const char*) {}
protected:
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.303
retrieving revision 1.304
diff -C 2 -d -r1.303 -r1.304
*** cmLocalGenerator.cxx 14 Jul 2009 18:16:46 -0000 1.303
--- cmLocalGenerator.cxx 17 Jul 2009 14:05:52 -0000 1.304
***************
*** 44,49 ****
cmLocalGenerator::cmLocalGenerator()
{
! this->Makefile = new cmMakefile;
! this->Makefile->SetLocalGenerator(this);
this->Parent = 0;
this->WindowsShell = false;
--- 44,48 ----
cmLocalGenerator::cmLocalGenerator()
{
! this->Makefile = 0; // moved to after set on global
this->Parent = 0;
this->WindowsShell = false;
***************
*** 174,177 ****
--- 173,178 ----
{
this->GlobalGenerator = gg;
+ this->Makefile = new cmMakefile;
+ this->Makefile->SetLocalGenerator(this);
// setup the home directories
Index: cmGlobalVisualStudioGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudioGenerator.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C 2 -d -r1.9 -r1.10
*** cmGlobalVisualStudioGenerator.h 14 Jul 2009 18:16:46 -0000 1.9
--- cmGlobalVisualStudioGenerator.h 17 Jul 2009 14:05:52 -0000 1.10
***************
*** 70,74 ****
protected:
- virtual void CreateGUID(const char*) {}
void FixUtilityDepends();
--- 70,73 ----
Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.512
retrieving revision 1.513
diff -C 2 -d -r1.512 -r1.513
*** cmMakefile.cxx 11 Jul 2009 04:05:20 -0000 1.512
--- cmMakefile.cxx 17 Jul 2009 14:05:54 -0000 1.513
***************
*** 81,95 ****
this->LocalGenerator = 0;
- #if defined(CMAKE_BUILD_WITH_CMAKE)
- this->AddSourceGroup("", "^.*$");
- this->AddSourceGroup
- ("Source Files",
- "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp"
- "|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$");
- this->AddSourceGroup("Header Files",
- "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$");
- this->AddSourceGroup("CMake Rules", "\\.rule$");
- this->AddSourceGroup("Resources", "\\.plist$");
- #endif
this->AddDefaultDefinitions();
this->Initialize();
--- 81,84 ----
***************
*** 756,759 ****
--- 745,762 ----
{
this->LocalGenerator = lg;
+ // the source groups need to access the global generator
+ // so don't create them until the lg is set
+ #if defined(CMAKE_BUILD_WITH_CMAKE)
+ this->AddSourceGroup("", "^.*$");
+ this->AddSourceGroup
+ ("Source Files",
+ "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp"
+ "|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$");
+ this->AddSourceGroup("Header Files",
+ "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$");
+ this->AddSourceGroup("CMake Rules", "\\.rule$");
+ this->AddSourceGroup("Resources", "\\.plist$");
+ #endif
+
}
***************
*** 1957,1964 ****
--- 1960,1982 ----
// build the whole source group path
+ const char* fullname = sg->GetFullName();
+ cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator();
+ if(strlen(fullname))
+ {
+ std::string guidName = "SG_Filter_";
+ guidName += fullname;
+ gg->CreateGUID(guidName.c_str());
+ }
for(++i; i<=lastElement; ++i)
{
sg->AddChild(cmSourceGroup(name[i].c_str(), 0, sg->GetFullName()));
sg = sg->lookupChild(name[i].c_str());
+ fullname = sg->GetFullName();
+ if(strlen(fullname))
+ {
+ std::string guidName = "SG_Filter_";
+ guidName += fullname;
+ gg->CreateGUID(guidName.c_str());
+ }
}
More information about the Cmake-commits
mailing list