summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-03-31 15:01:52 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-03-31 15:01:52 (GMT)
commitd0cea4c7bb19fecd5b0f7c7636d089a8ef28825b (patch)
treed770b39b441c777d12a6c8127966549cd9bf8860 /Source/cmLocalUnixMakefileGenerator.cxx
parentd1185c59104565a96026ee78498f8739b77b2b3c (diff)
downloadCMake-d0cea4c7bb19fecd5b0f7c7636d089a8ef28825b.zip
CMake-d0cea4c7bb19fecd5b0f7c7636d089a8ef28825b.tar.gz
CMake-d0cea4c7bb19fecd5b0f7c7636d089a8ef28825b.tar.bz2
ENH: make relative paths optional and default off, and add a test for them
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index aec784f..ae30cdd 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -32,6 +32,7 @@ cmLocalUnixMakefileGenerator::cmLocalUnixMakefileGenerator()
m_MakefileVariableSize = 0;
m_IgnoreLibPrefix = false;
m_PassMakeflags = false;
+ m_UseRelativePaths = false;
}
cmLocalUnixMakefileGenerator::~cmLocalUnixMakefileGenerator()
@@ -41,6 +42,7 @@ cmLocalUnixMakefileGenerator::~cmLocalUnixMakefileGenerator()
void cmLocalUnixMakefileGenerator::Generate(bool fromTheTop)
{
+ m_UseRelativePaths = m_Makefile->IsOn("CMAKE_USE_RELATIVE_PATHS");
// suppoirt override in output directories
if (m_Makefile->GetDefinition("LIBRARY_OUTPUT_PATH"))
{
@@ -700,12 +702,12 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
if(emitted.insert(libpath).second)
{
std::string fullLibPath;
- if(!m_WindowsShell)
+ if(!m_WindowsShell && m_UseRelativePaths)
{
fullLibPath = "\"`cd ";
}
fullLibPath += libpath;
- if(!m_WindowsShell)
+ if(!m_WindowsShell && m_UseRelativePaths)
{
fullLibPath += ";pwd`\"";
}
@@ -1076,16 +1078,16 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout,
std::string outpath;
std::string outdir = this->ConvertToRelativeOutputPath(m_LibraryOutputPath.c_str());
- if(!m_WindowsShell && outdir.size())
+ if(!m_WindowsShell && m_UseRelativePaths && outdir.size())
{
outpath = "\"`cd ";
}
outpath += outdir;
- if(!m_WindowsShell && outdir.size())
+ if(!m_WindowsShell && m_UseRelativePaths && outdir.size())
{
outpath += ";pwd`\"/";
}
- if(outdir.size() == 0 && !m_WindowsShell)
+ if(outdir.size() == 0 && m_UseRelativePaths && !m_WindowsShell)
{
outpath = "\"`pwd`\"/";
}