ENH: executable prefix and post fix variables should not be the same as the executable extension

This commit is contained in:
Bill Hoffman 2005-11-23 10:27:05 -05:00
parent 77fb139317
commit d0e801247f
1 changed files with 2 additions and 4 deletions

View File

@ -894,7 +894,6 @@ const char* cmTarget::GetSuffixVariableInternal(TargetType type)
case cmTarget::MODULE_LIBRARY: case cmTarget::MODULE_LIBRARY:
return "CMAKE_SHARED_MODULE_SUFFIX"; return "CMAKE_SHARED_MODULE_SUFFIX";
case cmTarget::EXECUTABLE: case cmTarget::EXECUTABLE:
return cmSystemTools::GetExecutableExtension();
case cmTarget::UTILITY: case cmTarget::UTILITY:
case cmTarget::INSTALL_FILES: case cmTarget::INSTALL_FILES:
case cmTarget::INSTALL_PROGRAMS: case cmTarget::INSTALL_PROGRAMS:
@ -920,7 +919,6 @@ const char* cmTarget::GetPrefixVariableInternal(TargetType type)
case cmTarget::MODULE_LIBRARY: case cmTarget::MODULE_LIBRARY:
return "CMAKE_SHARED_MODULE_PREFIX"; return "CMAKE_SHARED_MODULE_PREFIX";
case cmTarget::EXECUTABLE: case cmTarget::EXECUTABLE:
return cmSystemTools::GetExecutableExtension();
case cmTarget::UTILITY: case cmTarget::UTILITY:
case cmTarget::INSTALL_FILES: case cmTarget::INSTALL_FILES:
case cmTarget::INSTALL_PROGRAMS: case cmTarget::INSTALL_PROGRAMS:
@ -951,12 +949,12 @@ std::string cmTarget::GetFullNameInternal(cmMakefile* mf,
// first try language specific suffix // first try language specific suffix
if(ll) if(ll)
{ {
if(!targetSuffix) if(!targetSuffix && suffixVar && *suffixVar)
{ {
std::string langSuff = suffixVar + std::string("_") + ll; std::string langSuff = suffixVar + std::string("_") + ll;
targetSuffix = mf->GetDefinition(langSuff.c_str()); targetSuffix = mf->GetDefinition(langSuff.c_str());
} }
if(!targetPrefix) if(!targetPrefix && prefixVar && *prefixVar)
{ {
std::string langPrefix = prefixVar + std::string("_") + ll; std::string langPrefix = prefixVar + std::string("_") + ll;
targetPrefix = mf->GetDefinition(langPrefix.c_str()); targetPrefix = mf->GetDefinition(langPrefix.c_str());