summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-12-29 04:07:26 (GMT)
committerBrad King <brad.king@kitware.com>2007-12-29 04:07:26 (GMT)
commit3efc6e40cb6ae2f3c73a6a1b9d483ca12f9861d6 (patch)
tree3a8d814f2d121e14e1f8dfd0fb80cc358414a694 /Source
parentf872c10b7ee3fe675e7a2066c20c7a749efd8238 (diff)
downloadCMake-3efc6e40cb6ae2f3c73a6a1b9d483ca12f9861d6.zip
CMake-3efc6e40cb6ae2f3c73a6a1b9d483ca12f9861d6.tar.gz
CMake-3efc6e40cb6ae2f3c73a6a1b9d483ca12f9861d6.tar.bz2
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 78db8ed..d22a2ef 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2753,11 +2753,14 @@ cmLocalGenerator
// 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.