summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-11-23 15:27:05 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-11-23 15:27:05 (GMT)
commitd0e801247f334dee4c01b0f03504e37f63365828 (patch)
tree0f591270912209b7e6b8b90a4e8e4be0cdfcc05b /Source/cmTarget.cxx
parent77fb1393174975d80f65243e9879189c06504f91 (diff)
downloadCMake-d0e801247f334dee4c01b0f03504e37f63365828.zip
CMake-d0e801247f334dee4c01b0f03504e37f63365828.tar.gz
CMake-d0e801247f334dee4c01b0f03504e37f63365828.tar.bz2
ENH: executable prefix and post fix variables should not be the same as the executable extension
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 33eaa9c..9debb61 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -894,7 +894,6 @@ const char* cmTarget::GetSuffixVariableInternal(TargetType type)
case cmTarget::MODULE_LIBRARY:
return "CMAKE_SHARED_MODULE_SUFFIX";
case cmTarget::EXECUTABLE:
- return cmSystemTools::GetExecutableExtension();
case cmTarget::UTILITY:
case cmTarget::INSTALL_FILES:
case cmTarget::INSTALL_PROGRAMS:
@@ -920,7 +919,6 @@ const char* cmTarget::GetPrefixVariableInternal(TargetType type)
case cmTarget::MODULE_LIBRARY:
return "CMAKE_SHARED_MODULE_PREFIX";
case cmTarget::EXECUTABLE:
- return cmSystemTools::GetExecutableExtension();
case cmTarget::UTILITY:
case cmTarget::INSTALL_FILES:
case cmTarget::INSTALL_PROGRAMS:
@@ -951,12 +949,12 @@ std::string cmTarget::GetFullNameInternal(cmMakefile* mf,
// first try language specific suffix
if(ll)
{
- if(!targetSuffix)
+ if(!targetSuffix && suffixVar && *suffixVar)
{
std::string langSuff = suffixVar + std::string("_") + ll;
targetSuffix = mf->GetDefinition(langSuff.c_str());
}
- if(!targetPrefix)
+ if(!targetPrefix && prefixVar && *prefixVar)
{
std::string langPrefix = prefixVar + std::string("_") + ll;
targetPrefix = mf->GetDefinition(langPrefix.c_str());