[Cmake-commits] [cmake-commits] king committed cmPolicies.cxx 1.7 1.8
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Mar 5 17:26:36 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv25410
Modified Files:
cmPolicies.cxx
Log Message:
BUG: Fix parsing of policy version number in cmPolicies.
Index: cmPolicies.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -C 2 -d -r1.7 -r1.8
*** cmPolicies.cxx 5 Mar 2008 16:41:24 -0000 1.7
--- cmPolicies.cxx 5 Mar 2008 22:26:32 -0000 1.8
***************
*** 176,198 ****
unsigned int minorVer = 0;
unsigned int patchVer = 0;
!
// parse the string
! std::string major = ver.substr(0,ver.find('.'));
! std::string patch = ver.substr(ver.find('.'));
! std::string minor = patch.substr(0,patch.find('.'));
! patch = patch.substr(patch.find('.'));
!
! if (major.size())
! {
! majorVer = atoi(major.c_str());
! }
! if (minor.size())
! {
! minorVer = atoi(minor.c_str());
! }
! if (patch.size())
! {
! patchVer = atoi(patch.c_str());
! }
// add in the old CMAKE_BACKWARDS_COMPATIBILITY var for old CMake compatibility
--- 176,183 ----
unsigned int minorVer = 0;
unsigned int patchVer = 0;
!
// 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
More information about the Cmake-commits
mailing list