summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-11-13 23:27:29 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-11-13 23:27:29 (GMT)
commitc1c3149d162ed2071db76d1b1ad4740ebb4c129d (patch)
tree97e65782d95b97a4554546128027e5d33254ac11
parentfe8428a3eed300833e1e184fefcb227aab99d20f (diff)
downloadCMake-c1c3149d162ed2071db76d1b1ad4740ebb4c129d.zip
CMake-c1c3149d162ed2071db76d1b1ad4740ebb4c129d.tar.gz
CMake-c1c3149d162ed2071db76d1b1ad4740ebb4c129d.tar.bz2
BUG: fix for build out of dir for windows
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx29
-rw-r--r--Source/cmLocalUnixMakefileGenerator.h5
2 files changed, 34 insertions, 0 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index c89a4d6..bb244f1 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -1222,12 +1222,41 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout)
}
}
+void cmLocalUnixMakefileGenerator::OutputBuildTargetInDirWindows(std::ostream& fout,
+ const char* path,
+ const char* library,
+ const char* fullpath,
+ const char* libOutPath)
+{
+ const char* makeTarget = library;
+ std::string currentDir =
+ cmSystemTools::ConvertToOutputPath(m_Makefile->GetCurrentOutputDirectory());
+ std::string wpath = cmSystemTools::ConvertToOutputPath(path);
+ std::string wfullpath = cmSystemTools::ConvertToOutputPath(fullpath);
+ if(libOutPath && strcmp( libOutPath, "" ) != 0)
+ {
+ makeTarget = wfullpath.c_str();
+ }
+ fout << wfullpath
+ << ":\n\tcd " << wpath << "\n"
+ << "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.depends\n"
+ << "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.check_depends\n"
+ << "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) -f cmake.check_depends\n"
+ << "\t$(MAKE) $(MAKESILENT) " << makeTarget
+ << "\n\tcd " << currentDir << "\n";
+}
+
void cmLocalUnixMakefileGenerator::OutputBuildTargetInDir(std::ostream& fout,
const char* path,
const char* library,
const char* fullpath,
const char* outputPath)
{
+ if(m_WindowsShell)
+ {
+ this->OutputBuildTargetInDirWindows(fout, path, library, fullpath, outputPath);
+ return;
+ }
const char* makeTarget = library;
if(outputPath && strcmp( outputPath, "" ) != 0)
{
diff --git a/Source/cmLocalUnixMakefileGenerator.h b/Source/cmLocalUnixMakefileGenerator.h
index 70a43d6..c2604f0 100644
--- a/Source/cmLocalUnixMakefileGenerator.h
+++ b/Source/cmLocalUnixMakefileGenerator.h
@@ -164,6 +164,11 @@ protected:
const char* command2 = 0,
const char* command3 = 0,
const char* command4 = 0);
+ virtual void OutputBuildTargetInDirWindows(std::ostream& fout,
+ const char* path,
+ const char* library,
+ const char* fullpath,
+ const char* outputPath);
virtual void OutputBuildTargetInDir(std::ostream& fout,
const char* path,
const char* library,