[Cmake-commits] [cmake-commits] king committed cmPolicies.cxx 1.8 1.9
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Mar 5 18:20:22 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv3072/Source
Modified Files:
cmPolicies.cxx
Log Message:
BUG: Require policy version to specify at least major.minor. Do not store CMAKE_BACKWARDS_COMPATIBILITY with an invalid version value.
Index: cmPolicies.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** cmPolicies.cxx 5 Mar 2008 22:26:32 -0000 1.8
--- cmPolicies.cxx 5 Mar 2008 23:20:20 -0000 1.9
***************
*** 178,183 ****
// parse the string
! sscanf(ver.c_str(), "%u.%u.%u",
! &majorVer, &minorVer, &patchVer);
// add in the old CMAKE_BACKWARDS_COMPATIBILITY var for old CMake compatibility
--- 178,186 ----
// parse the string
! if(sscanf(ver.c_str(), "%u.%u.%u",
! &majorVer, &minorVer, &patchVer) < 2)
! {
! return false;
! }
// add in the old CMAKE_BACKWARDS_COMPATIBILITY var for old CMake compatibility
***************
*** 187,192 ****
GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))
{
mf->AddCacheDefinition
! ("CMAKE_BACKWARDS_COMPATIBILITY",version,
"For backwards compatibility, what version of CMake commands and "
"syntax should this version of CMake try to support.",
--- 190,197 ----
GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))
{
+ cmOStringStream v;
+ v << majorVer << "." << minorVer << "." << patchVer;
mf->AddCacheDefinition
! ("CMAKE_BACKWARDS_COMPATIBILITY", v.str().c_str(),
"For backwards compatibility, what version of CMake commands and "
"syntax should this version of CMake try to support.",
More information about the Cmake-commits
mailing list