ENH: Only mangle object files if CMAKE_MANGLE_OBJECT_FILE_NAMES is set. Only on borland for now.

This commit is contained in:
Andy Cedilnik 2004-05-04 11:24:32 -04:00
parent 1f6e59a7fe
commit ea8dc0769d
2 changed files with 34 additions and 25 deletions

View File

@ -21,6 +21,8 @@ SET(BORLAND 1)
#SET(CMAKE_END_TEMP_FILE "")
#SET(CMAKE_VERBOSE_MAKEFILE 1)
# Borland cannot handle + in the file name, so mangle object file name
SET (CMAKE_MANGLE_OBJECT_FILE_NAMES "ON")
# create a shared C++ library
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY

View File

@ -3076,6 +3076,8 @@ std::string cmLocalUnixMakefileGenerator::LowerCasePath(const char* path)
std::string&
cmLocalUnixMakefileGenerator::CreateSafeUniqueObjectFileName(const char* sin)
{
if ( m_Makefile->IsOn("CMAKE_MANGLE_OBJECT_FILE_NAMES") )
{
std::map<cmStdString,cmStdString>::iterator it = m_UniqueObjectNamesMap.find(sin);
if ( it == m_UniqueObjectNamesMap.end() )
@ -3110,6 +3112,11 @@ cmLocalUnixMakefileGenerator::CreateSafeUniqueObjectFileName(const char* sin)
while ( !done );
m_UniqueObjectNamesMap[sin] = ssin;
}
}
else
{
m_UniqueObjectNamesMap[sin] = sin;
}
return m_UniqueObjectNamesMap[sin];
}