[Cmake-commits] [cmake-commits] king committed cmMakefile.cxx 1.517 1.518 cmMakefile.h 1.257 1.258 cmOptionCommand.cxx 1.23 1.24
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Sep 10 16:59:38 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv888/Source
Modified Files:
cmMakefile.cxx cmMakefile.h cmOptionCommand.cxx
Log Message:
Remove barely-used cmMakefile::AddCacheDefinition
The boolean overload of this method was used only to implement option().
We re-implement option() in terms of the main method and removes the
now-unused signature. This removes some duplicate code that had already
fallen behind on changes (it was not removing the local definition
instead of setting it).
Index: cmOptionCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmOptionCommand.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -C 2 -d -r1.23 -r1.24
*** cmOptionCommand.cxx 23 Jan 2008 15:27:59 -0000 1.23
--- cmOptionCommand.cxx 10 Sep 2009 20:59:36 -0000 1.24
***************
*** 70,77 ****
initialValue = args[2];
}
! this->Makefile->AddCacheDefinition(args[0].c_str(),
! cmSystemTools::IsOn(initialValue.c_str()),
! args[1].c_str());
!
return true;
}
--- 70,75 ----
initialValue = args[2];
}
! this->Makefile->AddCacheDefinition(args[0].c_str(), initialValue.c_str(),
! args[1].c_str(), cmCacheManager::BOOL);
return true;
}
Index: cmMakefile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.h,v
retrieving revision 1.257
retrieving revision 1.258
diff -C 2 -d -r1.257 -r1.258
*** cmMakefile.h 4 Aug 2009 18:37:46 -0000 1.257
--- cmMakefile.h 10 Sep 2009 20:59:36 -0000 1.258
***************
*** 295,300 ****
*/
void AddDefinition(const char* name, bool);
- ///! Add a definition to this makefile and the global cmake cache.
- void AddCacheDefinition(const char* name, bool, const char* doc);
/**
--- 295,298 ----
Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.517
retrieving revision 1.518
diff -C 2 -d -r1.517 -r1.518
*** cmMakefile.cxx 11 Aug 2009 13:07:28 -0000 1.517
--- cmMakefile.cxx 10 Sep 2009 20:59:36 -0000 1.518
***************
*** 1721,1741 ****
}
-
- void cmMakefile::AddCacheDefinition(const char* name,
- bool value,
- const char* doc)
- {
- bool val = value;
- cmCacheManager::CacheIterator it =
- this->GetCacheManager()->GetCacheIterator(name);
- if(!it.IsAtEnd() && (it.GetType() == cmCacheManager::UNINITIALIZED) &&
- it.Initialized())
- {
- val = it.GetValueAsBool();
- }
- this->GetCacheManager()->AddCacheEntry(name, val, doc);
- this->AddDefinition(name, val);
- }
-
void cmMakefile::RemoveDefinition(const char* name)
{
--- 1721,1724 ----
More information about the Cmake-commits
mailing list