mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -05:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user