summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-07-07 14:14:57 (GMT)
committerBrad King <brad.king@kitware.com>2005-07-07 14:14:57 (GMT)
commita899321dc23b6249619a8ac425d9d0965257d871 (patch)
tree95335523f2fa608deaa84f8431318d470a25ef06 /Source/cmLocalUnixMakefileGenerator3.cxx
parentdcc0aa12967fac24c288049890cc9793f3ad1c02 (diff)
downloadCMake-a899321dc23b6249619a8ac425d9d0965257d871.zip
CMake-a899321dc23b6249619a8ac425d9d0965257d871.tar.gz
CMake-a899321dc23b6249619a8ac425d9d0965257d871.tar.bz2
ENH: Added use of CMAKE_TARGET_DIR_PREFIX variable to prepend a project-specified string to the names of all the target-name.dir directories.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 38b6203..09cd2d7 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1931,7 +1931,13 @@ cmLocalUnixMakefileGenerator3
std::string
cmLocalUnixMakefileGenerator3::GetTargetDirectory(cmTarget& target)
{
- std::string dir = target.GetName();
+ std::string dir;
+ // Put a prefix on the name if one is given by the CMake code.
+ if(const char* prefix = m_Makefile->GetDefinition("CMAKE_TARGET_DIR_PREFIX"))
+ {
+ dir += prefix;
+ }
+ dir += target.GetName();
dir += ".dir";
const char* hideDirs=m_Makefile->GetDefinition("CMAKE_HIDE_TARGET_DIRS");
if (hideDirs && !cmSystemTools::IsOff(hideDirs))