BUG: The .pdb file generated for a library or executable should match the real file name used for the target. This addresses bug#3277.
This commit is contained in:
parent
9d217a94e5
commit
712345ffc4
@ -208,8 +208,9 @@ cmInstallTargetGenerator
|
|||||||
std::string targetNameSO;
|
std::string targetNameSO;
|
||||||
std::string targetNameReal;
|
std::string targetNameReal;
|
||||||
std::string targetNameImport;
|
std::string targetNameImport;
|
||||||
|
std::string targetNamePDB;
|
||||||
target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
|
target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
|
||||||
targetNameImport, i->c_str());
|
targetNameImport, targetNamePDB, i->c_str());
|
||||||
if(this->ImportLibrary)
|
if(this->ImportLibrary)
|
||||||
{
|
{
|
||||||
// Use the import library name.
|
// Use the import library name.
|
||||||
@ -245,8 +246,10 @@ std::string cmInstallTargetGenerator::GetScriptReference(cmTarget* target,
|
|||||||
std::string targetNameSO;
|
std::string targetNameSO;
|
||||||
std::string targetNameReal;
|
std::string targetNameReal;
|
||||||
std::string targetNameImport;
|
std::string targetNameImport;
|
||||||
|
std::string targetNamePDB;
|
||||||
target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
|
target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
|
||||||
targetNameImport, this->ConfigurationName);
|
targetNameImport, targetNamePDB,
|
||||||
|
this->ConfigurationName);
|
||||||
if(this->ImportLibrary)
|
if(this->ImportLibrary)
|
||||||
{
|
{
|
||||||
// Use the import library name.
|
// Use the import library name.
|
||||||
|
@ -1691,8 +1691,9 @@ cmLocalUnixMakefileGenerator3
|
|||||||
objectName = cmSystemTools::GetFilenameName(objectName.c_str());
|
objectName = cmSystemTools::GetFilenameName(objectName.c_str());
|
||||||
std::string targetName;
|
std::string targetName;
|
||||||
std::string targetNameReal;
|
std::string targetNameReal;
|
||||||
|
std::string targetNamePDB;
|
||||||
target.GetExecutableNames(targetName, targetNameReal,
|
target.GetExecutableNames(targetName, targetNameReal,
|
||||||
this->ConfigurationName.c_str());
|
targetNamePDB, this->ConfigurationName.c_str());
|
||||||
if ( target.GetPropertyAsBool("MACOSX_BUNDLE") )
|
if ( target.GetPropertyAsBool("MACOSX_BUNDLE") )
|
||||||
{
|
{
|
||||||
// Construct the full path version of the names.
|
// Construct the full path version of the names.
|
||||||
|
@ -568,9 +568,32 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
|
|||||||
flagMap.find("DebugInformationFormat");
|
flagMap.find("DebugInformationFormat");
|
||||||
if(mi != flagMap.end() && mi->second != "1")
|
if(mi != flagMap.end() && mi->second != "1")
|
||||||
{
|
{
|
||||||
fout << "\t\t\t\tProgramDataBaseFileName=\""
|
if(target.GetType() == cmTarget::EXECUTABLE)
|
||||||
<< this->LibraryOutputPath
|
{
|
||||||
<< "$(OutDir)/" << libName << ".pdb\"\n";
|
std::string targetName;
|
||||||
|
std::string targetNameFull;
|
||||||
|
std::string targetNamePDB;
|
||||||
|
target.GetExecutableNames(targetName, targetNameFull,
|
||||||
|
targetNamePDB, configName);
|
||||||
|
fout << "\t\t\t\tProgramDataBaseFileName=\""
|
||||||
|
<< this->ExecutableOutputPath
|
||||||
|
<< "$(OutDir)/" << targetNamePDB << "\"\n";
|
||||||
|
}
|
||||||
|
else if(target.GetType() == cmTarget::STATIC_LIBRARY ||
|
||||||
|
target.GetType() == cmTarget::SHARED_LIBRARY ||
|
||||||
|
target.GetType() == cmTarget::MODULE_LIBRARY)
|
||||||
|
{
|
||||||
|
std::string targetName;
|
||||||
|
std::string targetNameSO;
|
||||||
|
std::string targetNameFull;
|
||||||
|
std::string targetNameImport;
|
||||||
|
std::string targetNamePDB;
|
||||||
|
target.GetLibraryNames(targetName, targetNameSO, targetNameFull,
|
||||||
|
targetNameImport, targetNamePDB, configName);
|
||||||
|
fout << "\t\t\t\tProgramDataBaseFileName=\""
|
||||||
|
<< this->LibraryOutputPath
|
||||||
|
<< "$(OutDir)/" << targetNamePDB << "\"\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fout << "/>\n"; // end of <Tool Name=VCCLCompilerTool
|
fout << "/>\n"; // end of <Tool Name=VCCLCompilerTool
|
||||||
fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCCustomBuildTool\"/>\n";
|
fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCCustomBuildTool\"/>\n";
|
||||||
@ -625,7 +648,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->OutputTargetRules(fout, target, libName);
|
this->OutputTargetRules(fout, target, libName);
|
||||||
this->OutputBuildTool(fout, configName, libName, target);
|
this->OutputBuildTool(fout, configName, target);
|
||||||
fout << "\t\t</Configuration>\n";
|
fout << "\t\t</Configuration>\n";
|
||||||
}
|
}
|
||||||
void cmLocalVisualStudio7Generator::ReplaceFlagSetMap(std::string& flags,
|
void cmLocalVisualStudio7Generator::ReplaceFlagSetMap(std::string& flags,
|
||||||
@ -725,10 +748,8 @@ cmLocalVisualStudio7Generator
|
|||||||
|
|
||||||
void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
||||||
const char* configName,
|
const char* configName,
|
||||||
const char *libName,
|
|
||||||
cmTarget &target)
|
cmTarget &target)
|
||||||
{
|
{
|
||||||
std::string targetFullName = target.GetFullName(configName);
|
|
||||||
std::string temp;
|
std::string temp;
|
||||||
std::string extraLinkOptions;
|
std::string extraLinkOptions;
|
||||||
if(target.GetType() == cmTarget::EXECUTABLE)
|
if(target.GetType() == cmTarget::EXECUTABLE)
|
||||||
@ -776,8 +797,9 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
|||||||
{
|
{
|
||||||
case cmTarget::STATIC_LIBRARY:
|
case cmTarget::STATIC_LIBRARY:
|
||||||
{
|
{
|
||||||
|
std::string targetNameFull = target.GetFullName(configName);
|
||||||
std::string libpath = this->LibraryOutputPath +
|
std::string libpath = this->LibraryOutputPath +
|
||||||
"$(OutDir)/" + targetFullName;
|
"$(OutDir)/" + targetNameFull;
|
||||||
fout << "\t\t\t<Tool\n"
|
fout << "\t\t\t<Tool\n"
|
||||||
<< "\t\t\t\tName=\"VCLibrarianTool\"\n";
|
<< "\t\t\t\tName=\"VCLibrarianTool\"\n";
|
||||||
if(const char* libflags = target.GetProperty("STATIC_LIBRARY_FLAGS"))
|
if(const char* libflags = target.GetProperty("STATIC_LIBRARY_FLAGS"))
|
||||||
@ -791,6 +813,25 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
|||||||
case cmTarget::SHARED_LIBRARY:
|
case cmTarget::SHARED_LIBRARY:
|
||||||
case cmTarget::MODULE_LIBRARY:
|
case cmTarget::MODULE_LIBRARY:
|
||||||
{
|
{
|
||||||
|
std::string targetName;
|
||||||
|
std::string targetNameSO;
|
||||||
|
std::string targetNameFull;
|
||||||
|
std::string targetNameImport;
|
||||||
|
std::string targetNamePDB;
|
||||||
|
target.GetLibraryNames(targetName, targetNameSO, targetNameFull,
|
||||||
|
targetNameImport, targetNamePDB, configName);
|
||||||
|
|
||||||
|
// VS does not distinguish between shared libraries and module
|
||||||
|
// libraries so it still wants to be given the name of an import
|
||||||
|
// library for modules.
|
||||||
|
if(targetNameImport.empty() &&
|
||||||
|
target.GetType() == cmTarget::MODULE_LIBRARY)
|
||||||
|
{
|
||||||
|
targetNameImport =
|
||||||
|
cmSystemTools::GetFilenameWithoutLastExtension(targetNameFull);
|
||||||
|
targetNameImport += ".lib";
|
||||||
|
}
|
||||||
|
|
||||||
// Compute the link library and directory information.
|
// Compute the link library and directory information.
|
||||||
std::vector<cmStdString> linkLibs;
|
std::vector<cmStdString> linkLibs;
|
||||||
std::vector<cmStdString> linkDirs;
|
std::vector<cmStdString> linkDirs;
|
||||||
@ -832,7 +873,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
|||||||
temp = this->LibraryOutputPath;
|
temp = this->LibraryOutputPath;
|
||||||
temp += configName;
|
temp += configName;
|
||||||
temp += "/";
|
temp += "/";
|
||||||
temp += targetFullName;
|
temp += targetNameFull;
|
||||||
fout << "\t\t\t\tOutputFile=\""
|
fout << "\t\t\t\tOutputFile=\""
|
||||||
<< this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n";
|
<< this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n";
|
||||||
this->WriteTargetVersionAttribute(fout, target);
|
this->WriteTargetVersionAttribute(fout, target);
|
||||||
@ -847,8 +888,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
|||||||
this->OutputModuleDefinitionFile(fout, target);
|
this->OutputModuleDefinitionFile(fout, target);
|
||||||
temp = this->LibraryOutputPath;
|
temp = this->LibraryOutputPath;
|
||||||
temp += "$(OutDir)/";
|
temp += "$(OutDir)/";
|
||||||
temp += libName;
|
temp += targetNamePDB;
|
||||||
temp += ".pdb";
|
|
||||||
fout << "\t\t\t\tProgramDataBaseFile=\"" <<
|
fout << "\t\t\t\tProgramDataBaseFile=\"" <<
|
||||||
this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n";
|
this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n";
|
||||||
if(strcmp(configName, "Debug") == 0
|
if(strcmp(configName, "Debug") == 0
|
||||||
@ -867,15 +907,19 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
|||||||
temp = this->LibraryOutputPath;
|
temp = this->LibraryOutputPath;
|
||||||
temp += configName;
|
temp += configName;
|
||||||
temp += "/";
|
temp += "/";
|
||||||
temp +=
|
temp += targetNameImport;
|
||||||
cmSystemTools::GetFilenameWithoutLastExtension(targetFullName.c_str());
|
fout << "\t\t\t\tImportLibrary=\""
|
||||||
temp += ".lib";
|
|
||||||
fout << "\t\t\t\tImportLibrary=\""
|
|
||||||
<< this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"/>\n";
|
<< this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"/>\n";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case cmTarget::EXECUTABLE:
|
case cmTarget::EXECUTABLE:
|
||||||
{
|
{
|
||||||
|
std::string targetName;
|
||||||
|
std::string targetNameFull;
|
||||||
|
std::string targetNamePDB;
|
||||||
|
target.GetExecutableNames(targetName, targetNameFull,
|
||||||
|
targetNamePDB, configName);
|
||||||
|
|
||||||
// Compute the link library and directory information.
|
// Compute the link library and directory information.
|
||||||
std::vector<cmStdString> linkLibs;
|
std::vector<cmStdString> linkLibs;
|
||||||
std::vector<cmStdString> linkDirs;
|
std::vector<cmStdString> linkDirs;
|
||||||
@ -917,7 +961,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
|||||||
temp = this->ExecutableOutputPath;
|
temp = this->ExecutableOutputPath;
|
||||||
temp += configName;
|
temp += configName;
|
||||||
temp += "/";
|
temp += "/";
|
||||||
temp += targetFullName;
|
temp += targetNameFull;
|
||||||
fout << "\t\t\t\tOutputFile=\""
|
fout << "\t\t\t\tOutputFile=\""
|
||||||
<< this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n";
|
<< this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n";
|
||||||
this->WriteTargetVersionAttribute(fout, target);
|
this->WriteTargetVersionAttribute(fout, target);
|
||||||
@ -929,8 +973,8 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
|||||||
fout << "\t\t\t\tAdditionalLibraryDirectories=\"";
|
fout << "\t\t\t\tAdditionalLibraryDirectories=\"";
|
||||||
this->OutputLibraryDirectories(fout, linkDirs);
|
this->OutputLibraryDirectories(fout, linkDirs);
|
||||||
fout << "\"\n";
|
fout << "\"\n";
|
||||||
fout << "\t\t\t\tProgramDataBaseFile=\"" << this->LibraryOutputPath
|
fout << "\t\t\t\tProgramDataBaseFile=\"" << this->ExecutableOutputPath
|
||||||
<< "$(OutDir)\\" << libName << ".pdb\"\n";
|
<< "$(OutDir)\\" << targetNamePDB << "\"\n";
|
||||||
if(strcmp(configName, "Debug") == 0
|
if(strcmp(configName, "Debug") == 0
|
||||||
|| strcmp(configName, "RelWithDebInfo") == 0)
|
|| strcmp(configName, "RelWithDebInfo") == 0)
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ private:
|
|||||||
void OutputTargetRules(std::ostream& fout, cmTarget &target,
|
void OutputTargetRules(std::ostream& fout, cmTarget &target,
|
||||||
const char *libName);
|
const char *libName);
|
||||||
void OutputBuildTool(std::ostream& fout, const char* configName,
|
void OutputBuildTool(std::ostream& fout, const char* configName,
|
||||||
const char* libname, cmTarget& t);
|
cmTarget& t);
|
||||||
void OutputLibraries(std::ostream& fout,
|
void OutputLibraries(std::ostream& fout,
|
||||||
std::vector<cmStdString> const& libs);
|
std::vector<cmStdString> const& libs);
|
||||||
void OutputLibraryDirectories(std::ostream& fout,
|
void OutputLibraryDirectories(std::ostream& fout,
|
||||||
|
@ -110,8 +110,9 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
|||||||
// Get the name of the executable to generate.
|
// Get the name of the executable to generate.
|
||||||
std::string targetName;
|
std::string targetName;
|
||||||
std::string targetNameReal;
|
std::string targetNameReal;
|
||||||
|
std::string targetNamePDB;
|
||||||
this->Target->GetExecutableNames
|
this->Target->GetExecutableNames
|
||||||
(targetName, targetNameReal,
|
(targetName, targetNameReal, targetNamePDB,
|
||||||
this->LocalGenerator->ConfigurationName.c_str());
|
this->LocalGenerator->ConfigurationName.c_str());
|
||||||
|
|
||||||
// Construct the full path version of the names.
|
// Construct the full path version of the names.
|
||||||
@ -187,8 +188,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
|||||||
}
|
}
|
||||||
std::string targetFullPath = outpath + targetName;
|
std::string targetFullPath = outpath + targetName;
|
||||||
std::string targetFullPathReal = outpath + targetNameReal;
|
std::string targetFullPathReal = outpath + targetNameReal;
|
||||||
std::string targetFullPathPDB = outpath + this->Target->GetName();
|
std::string targetFullPathPDB = outpath + targetNamePDB;
|
||||||
targetFullPathPDB += ".pdb";
|
|
||||||
std::string targetOutPathPDB =
|
std::string targetOutPathPDB =
|
||||||
this->Convert(targetFullPathPDB.c_str(),
|
this->Convert(targetFullPathPDB.c_str(),
|
||||||
cmLocalGenerator::FULL,
|
cmLocalGenerator::FULL,
|
||||||
@ -269,12 +269,14 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
|||||||
{
|
{
|
||||||
std::string cleanName;
|
std::string cleanName;
|
||||||
std::string cleanRealName;
|
std::string cleanRealName;
|
||||||
|
std::string cleanPDBName;
|
||||||
this->Target->GetExecutableCleanNames
|
this->Target->GetExecutableCleanNames
|
||||||
(cleanName, cleanRealName,
|
(cleanName, cleanRealName, cleanPDBName,
|
||||||
this->LocalGenerator->ConfigurationName.c_str());
|
this->LocalGenerator->ConfigurationName.c_str());
|
||||||
|
|
||||||
std::string cleanFullName = outpath + cleanName;
|
std::string cleanFullName = outpath + cleanName;
|
||||||
std::string cleanFullRealName = outpath + cleanRealName;
|
std::string cleanFullRealName = outpath + cleanRealName;
|
||||||
|
std::string cleanFullPDBName = outpath + cleanPDBName;
|
||||||
exeCleanFiles.push_back(this->Convert(cleanFullName.c_str(),
|
exeCleanFiles.push_back(this->Convert(cleanFullName.c_str(),
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmLocalGenerator::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmLocalGenerator::UNCHANGED));
|
||||||
@ -291,6 +293,9 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
|||||||
cmLocalGenerator::START_OUTPUT,
|
cmLocalGenerator::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmLocalGenerator::UNCHANGED));
|
||||||
}
|
}
|
||||||
|
exeCleanFiles.push_back(this->Convert(cleanPDBName.c_str(),
|
||||||
|
cmLocalGenerator::START_OUTPUT,
|
||||||
|
cmLocalGenerator::UNCHANGED));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a command to remove any existing files for this executable.
|
// Add a command to remove any existing files for this executable.
|
||||||
|
@ -239,8 +239,9 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
|||||||
std::string targetNameSO;
|
std::string targetNameSO;
|
||||||
std::string targetNameReal;
|
std::string targetNameReal;
|
||||||
std::string targetNameImport;
|
std::string targetNameImport;
|
||||||
|
std::string targetNamePDB;
|
||||||
this->Target->GetLibraryNames(
|
this->Target->GetLibraryNames(
|
||||||
targetName, targetNameSO, targetNameReal, targetNameImport,
|
targetName, targetNameSO, targetNameReal, targetNameImport, targetNamePDB,
|
||||||
this->LocalGenerator->ConfigurationName.c_str());
|
this->LocalGenerator->ConfigurationName.c_str());
|
||||||
|
|
||||||
// Construct the full path version of the names.
|
// Construct the full path version of the names.
|
||||||
@ -259,8 +260,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
|||||||
outpath += "/";
|
outpath += "/";
|
||||||
}
|
}
|
||||||
std::string targetFullPath = outpath + targetName;
|
std::string targetFullPath = outpath + targetName;
|
||||||
std::string targetFullPathPDB =
|
std::string targetFullPathPDB = outpath + targetNamePDB;
|
||||||
outpath + this->Target->GetName() + std::string(".pdb");
|
|
||||||
std::string targetFullPathSO = outpath + targetNameSO;
|
std::string targetFullPathSO = outpath + targetNameSO;
|
||||||
std::string targetFullPathReal = outpath + targetNameReal;
|
std::string targetFullPathReal = outpath + targetNameReal;
|
||||||
std::string targetFullPathImport = outpath + targetNameImport;
|
std::string targetFullPathImport = outpath + targetNameImport;
|
||||||
@ -351,18 +351,21 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
|||||||
std::string cleanSharedSOName;
|
std::string cleanSharedSOName;
|
||||||
std::string cleanSharedRealName;
|
std::string cleanSharedRealName;
|
||||||
std::string cleanImportName;
|
std::string cleanImportName;
|
||||||
|
std::string cleanPDBName;
|
||||||
this->Target->GetLibraryCleanNames(
|
this->Target->GetLibraryCleanNames(
|
||||||
cleanStaticName,
|
cleanStaticName,
|
||||||
cleanSharedName,
|
cleanSharedName,
|
||||||
cleanSharedSOName,
|
cleanSharedSOName,
|
||||||
cleanSharedRealName,
|
cleanSharedRealName,
|
||||||
cleanImportName,
|
cleanImportName,
|
||||||
|
cleanPDBName,
|
||||||
this->LocalGenerator->ConfigurationName.c_str());
|
this->LocalGenerator->ConfigurationName.c_str());
|
||||||
std::string cleanFullStaticName = outpath + cleanStaticName;
|
std::string cleanFullStaticName = outpath + cleanStaticName;
|
||||||
std::string cleanFullSharedName = outpath + cleanSharedName;
|
std::string cleanFullSharedName = outpath + cleanSharedName;
|
||||||
std::string cleanFullSharedSOName = outpath + cleanSharedSOName;
|
std::string cleanFullSharedSOName = outpath + cleanSharedSOName;
|
||||||
std::string cleanFullSharedRealName = outpath + cleanSharedRealName;
|
std::string cleanFullSharedRealName = outpath + cleanSharedRealName;
|
||||||
std::string cleanFullImportName = outpath + cleanImportName;
|
std::string cleanFullImportName = outpath + cleanImportName;
|
||||||
|
std::string cleanFullPDBName = outpath + cleanPDBName;
|
||||||
libCleanFiles.push_back
|
libCleanFiles.push_back
|
||||||
(this->Convert(cleanFullStaticName.c_str(),
|
(this->Convert(cleanFullStaticName.c_str(),
|
||||||
cmLocalGenerator::START_OUTPUT,
|
cmLocalGenerator::START_OUTPUT,
|
||||||
@ -398,6 +401,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
|||||||
cmLocalGenerator::START_OUTPUT,
|
cmLocalGenerator::START_OUTPUT,
|
||||||
cmLocalGenerator::UNCHANGED));
|
cmLocalGenerator::UNCHANGED));
|
||||||
}
|
}
|
||||||
|
libCleanFiles.push_back
|
||||||
|
(this->Convert(cleanFullPDBName.c_str(),
|
||||||
|
cmLocalGenerator::START_OUTPUT,
|
||||||
|
cmLocalGenerator::UNCHANGED));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -1541,10 +1541,11 @@ void cmTarget::GetLibraryNames(std::string& name,
|
|||||||
std::string& soName,
|
std::string& soName,
|
||||||
std::string& realName,
|
std::string& realName,
|
||||||
std::string& impName,
|
std::string& impName,
|
||||||
|
std::string& pdbName,
|
||||||
const char* config)
|
const char* config)
|
||||||
{
|
{
|
||||||
// Get the names based on the real type of the library.
|
// Get the names based on the real type of the library.
|
||||||
this->GetLibraryNamesInternal(name, soName, realName, impName,
|
this->GetLibraryNamesInternal(name, soName, realName, impName, pdbName,
|
||||||
this->GetType(), config);
|
this->GetType(), config);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1553,6 +1554,7 @@ void cmTarget::GetLibraryCleanNames(std::string& staticName,
|
|||||||
std::string& sharedSOName,
|
std::string& sharedSOName,
|
||||||
std::string& sharedRealName,
|
std::string& sharedRealName,
|
||||||
std::string& importName,
|
std::string& importName,
|
||||||
|
std::string& pdbName,
|
||||||
const char* config)
|
const char* config)
|
||||||
{
|
{
|
||||||
// Get the name as if this were a static library.
|
// Get the name as if this were a static library.
|
||||||
@ -1560,7 +1562,7 @@ void cmTarget::GetLibraryCleanNames(std::string& staticName,
|
|||||||
std::string realName;
|
std::string realName;
|
||||||
std::string impName;
|
std::string impName;
|
||||||
this->GetLibraryNamesInternal(staticName, soName, realName, impName,
|
this->GetLibraryNamesInternal(staticName, soName, realName, impName,
|
||||||
cmTarget::STATIC_LIBRARY, config);
|
pdbName, cmTarget::STATIC_LIBRARY, config);
|
||||||
|
|
||||||
// Get the names as if this were a shared library.
|
// Get the names as if this were a shared library.
|
||||||
if(this->GetType() == cmTarget::STATIC_LIBRARY)
|
if(this->GetType() == cmTarget::STATIC_LIBRARY)
|
||||||
@ -1571,14 +1573,15 @@ void cmTarget::GetLibraryCleanNames(std::string& staticName,
|
|||||||
// type will never be MODULE. Either way the only names that
|
// type will never be MODULE. Either way the only names that
|
||||||
// might have to be cleaned are the shared library names.
|
// might have to be cleaned are the shared library names.
|
||||||
this->GetLibraryNamesInternal(sharedName, sharedSOName, sharedRealName,
|
this->GetLibraryNamesInternal(sharedName, sharedSOName, sharedRealName,
|
||||||
importName, cmTarget::SHARED_LIBRARY,
|
importName, pdbName,
|
||||||
config);
|
cmTarget::SHARED_LIBRARY, config);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Use the name of the real type of the library (shared or module).
|
// Use the name of the real type of the library (shared or module).
|
||||||
this->GetLibraryNamesInternal(sharedName, sharedSOName, sharedRealName,
|
this->GetLibraryNamesInternal(sharedName, sharedSOName, sharedRealName,
|
||||||
importName, this->GetType(), config);
|
importName, pdbName, this->GetType(),
|
||||||
|
config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1586,6 +1589,7 @@ void cmTarget::GetLibraryNamesInternal(std::string& name,
|
|||||||
std::string& soName,
|
std::string& soName,
|
||||||
std::string& realName,
|
std::string& realName,
|
||||||
std::string& impName,
|
std::string& impName,
|
||||||
|
std::string& pdbName,
|
||||||
TargetType type,
|
TargetType type,
|
||||||
const char* config)
|
const char* config)
|
||||||
{
|
{
|
||||||
@ -1672,27 +1676,34 @@ void cmTarget::GetLibraryNamesInternal(std::string& name,
|
|||||||
{
|
{
|
||||||
impName = "";
|
impName = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The program database file name.
|
||||||
|
pdbName = prefix+base+".pdb";
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmTarget::GetExecutableNames(std::string& name,
|
void cmTarget::GetExecutableNames(std::string& name,
|
||||||
std::string& realName,
|
std::string& realName,
|
||||||
|
std::string& pdbName,
|
||||||
const char* config)
|
const char* config)
|
||||||
{
|
{
|
||||||
// Get the names based on the real type of the executable.
|
// Get the names based on the real type of the executable.
|
||||||
this->GetExecutableNamesInternal(name, realName, this->GetType(), config);
|
this->GetExecutableNamesInternal(name, realName, pdbName,
|
||||||
|
this->GetType(), config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmTarget::GetExecutableCleanNames(std::string& name,
|
void cmTarget::GetExecutableCleanNames(std::string& name,
|
||||||
std::string& realName,
|
std::string& realName,
|
||||||
|
std::string& pdbName,
|
||||||
const char* config)
|
const char* config)
|
||||||
{
|
{
|
||||||
// Get the name and versioned name of this executable.
|
// Get the name and versioned name of this executable.
|
||||||
this->GetExecutableNamesInternal(name, realName, cmTarget::EXECUTABLE,
|
this->GetExecutableNamesInternal(name, realName, pdbName,
|
||||||
config);
|
cmTarget::EXECUTABLE, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmTarget::GetExecutableNamesInternal(std::string& name,
|
void cmTarget::GetExecutableNamesInternal(std::string& name,
|
||||||
std::string& realName,
|
std::string& realName,
|
||||||
|
std::string& pdbName,
|
||||||
TargetType type,
|
TargetType type,
|
||||||
const char* config)
|
const char* config)
|
||||||
{
|
{
|
||||||
@ -1732,6 +1743,9 @@ void cmTarget::GetExecutableNamesInternal(std::string& name,
|
|||||||
#if defined(__CYGWIN__)
|
#if defined(__CYGWIN__)
|
||||||
realName += suffix;
|
realName += suffix;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// The program database file name.
|
||||||
|
pdbName = prefix+base+".pdb";
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -215,7 +215,7 @@ public:
|
|||||||
should be called only on a library target. */
|
should be called only on a library target. */
|
||||||
void GetLibraryNames(std::string& name, std::string& soName,
|
void GetLibraryNames(std::string& name, std::string& soName,
|
||||||
std::string& realName, std::string& impName,
|
std::string& realName, std::string& impName,
|
||||||
const char* config);
|
std::string& pdbName, const char* config);
|
||||||
|
|
||||||
/** Get the names of the library used to remove existing copies of
|
/** Get the names of the library used to remove existing copies of
|
||||||
the library from the build tree either before linking or during
|
the library from the build tree either before linking or during
|
||||||
@ -226,20 +226,21 @@ public:
|
|||||||
std::string& sharedSOName,
|
std::string& sharedSOName,
|
||||||
std::string& sharedRealName,
|
std::string& sharedRealName,
|
||||||
std::string& importName,
|
std::string& importName,
|
||||||
|
std::string& pdbName,
|
||||||
const char* config);
|
const char* config);
|
||||||
|
|
||||||
/** Get the names of the executable needed to generate a build rule
|
/** Get the names of the executable needed to generate a build rule
|
||||||
that takes into account executable version numbers. This should
|
that takes into account executable version numbers. This should
|
||||||
be called only on an executable target. */
|
be called only on an executable target. */
|
||||||
void GetExecutableNames(std::string& name, std::string& realName,
|
void GetExecutableNames(std::string& name, std::string& realName,
|
||||||
const char* config);
|
std::string& pdbName, const char* config);
|
||||||
|
|
||||||
/** Get the names of the executable used to remove existing copies
|
/** Get the names of the executable used to remove existing copies
|
||||||
of the executable from the build tree either before linking or
|
of the executable from the build tree either before linking or
|
||||||
during a clean step. This should be called only on an
|
during a clean step. This should be called only on an
|
||||||
executable target. */
|
executable target. */
|
||||||
void GetExecutableCleanNames(std::string& name, std::string& realName,
|
void GetExecutableCleanNames(std::string& name, std::string& realName,
|
||||||
const char* config);
|
std::string& pdbName, const char* config);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compute whether this target must be relinked before installing.
|
* Compute whether this target must be relinked before installing.
|
||||||
@ -319,10 +320,12 @@ private:
|
|||||||
std::string& soName,
|
std::string& soName,
|
||||||
std::string& realName,
|
std::string& realName,
|
||||||
std::string& impName,
|
std::string& impName,
|
||||||
|
std::string& pdbName,
|
||||||
TargetType type,
|
TargetType type,
|
||||||
const char* config);
|
const char* config);
|
||||||
void GetExecutableNamesInternal(std::string& name,
|
void GetExecutableNamesInternal(std::string& name,
|
||||||
std::string& realName,
|
std::string& realName,
|
||||||
|
std::string& pdbName,
|
||||||
TargetType type,
|
TargetType type,
|
||||||
const char* config);
|
const char* config);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user