[cmake-commits] king committed cmLocalGenerator.cxx 1.245 1.246
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Dec 28 23:07:28 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv27239/Source
Modified Files:
cmLocalGenerator.cxx
Log Message:
BUG: Do not remove the source file extension when computing an object file name. This addresses bug #6169. If CMAKE_BACKWARDS_COMPATIBILITY is 2.4 or lower maintain the old behavior so that existing build trees and old project releases are not affected.
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -d -r1.245 -r1.246
--- cmLocalGenerator.cxx 29 Dec 2007 04:07:14 -0000 1.245
+++ cmLocalGenerator.cxx 29 Dec 2007 04:07:26 -0000 1.246
@@ -2753,11 +2753,14 @@
// extension.
if(!source.GetPropertyAsBool("KEEP_EXTENSION"))
{
- // Remove the original extension.
- std::string::size_type dot_pos = objectName.rfind(".");
- if(dot_pos != std::string::npos)
+ // Remove the original extension for CMake 2.4 compatibility.
+ if(this->NeedBackwardsCompatibility(2, 4))
{
- objectName = objectName.substr(0, dot_pos);
+ std::string::size_type dot_pos = objectName.rfind(".");
+ if(dot_pos != std::string::npos)
+ {
+ objectName = objectName.substr(0, dot_pos);
+ }
}
// Store the new extension.
More information about the Cmake-commits
mailing list