diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2003-12-29 19:55:43 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2003-12-29 19:55:43 (GMT) |
commit | b753a6794b6b96acb2499a4a9e67cb8bc16afdc6 (patch) | |
tree | 50b89d4d291b25e6850068f164e2696c74fec881 /Source/cmLocalUnixMakefileGenerator.cxx | |
parent | 46aaf2dae8440f8dcd5fada61368b5b29c263085 (diff) | |
download | CMake-b753a6794b6b96acb2499a4a9e67cb8bc16afdc6.zip CMake-b753a6794b6b96acb2499a4a9e67cb8bc16afdc6.tar.gz CMake-b753a6794b6b96acb2499a4a9e67cb8bc16afdc6.tar.bz2 |
BUG: use ./ infront of the current directory
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index dbb132e..e05ff42 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -1324,11 +1324,11 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout, target += cmSystemTools::GetExecutableExtension(); target = this->ConvertToRelativeOutputPath(target.c_str()); bool needsLocalTarget = false; - if(target.find('/') != target.npos) + if(target.find('/', 2) != target.npos) { needsLocalTarget = true; } - + std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") "; std::string depend = "$("; depend += this->CreateMakeVariable(name, "_SRC_OBJS") @@ -1922,7 +1922,13 @@ BuildInSubDirectoryWindows(std::ostream& fout, std::string currentDir = dir; cmSystemTools::ConvertToUnixSlashes(currentDir); std::string cdback = ".."; - for(unsigned int i =0; i < currentDir.size(); ++i) + unsigned int i = 0; + if(currentDir.size() > 2 && currentDir[0] == '.' && currentDir[1] == '/') + { + // start past ./ if it starts with ./ + i = 2; + } + for(; i < currentDir.size(); ++i) { if(currentDir[i] == '/') { |