summaryrefslogtreecommitdiffstats
path: root/Source/cmBorlandMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-12-07 15:58:06 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-12-07 15:58:06 (GMT)
commit30a56de4b7355d3fa69545af9571105b8cae8eb9 (patch)
tree503f00ad99e6bc1a14e83c756de0c14b13d5d620 /Source/cmBorlandMakefileGenerator.cxx
parent728d20302ee99b57bd19b2bd9501500907993913 (diff)
downloadCMake-30a56de4b7355d3fa69545af9571105b8cae8eb9.zip
CMake-30a56de4b7355d3fa69545af9571105b8cae8eb9.tar.gz
CMake-30a56de4b7355d3fa69545af9571105b8cae8eb9.tar.bz2
ENH: add custom commands for targets
Diffstat (limited to 'Source/cmBorlandMakefileGenerator.cxx')
-rw-r--r--Source/cmBorlandMakefileGenerator.cxx36
1 files changed, 32 insertions, 4 deletions
diff --git a/Source/cmBorlandMakefileGenerator.cxx b/Source/cmBorlandMakefileGenerator.cxx
index e90c1af..30a3844 100644
--- a/Source/cmBorlandMakefileGenerator.cxx
+++ b/Source/cmBorlandMakefileGenerator.cxx
@@ -69,6 +69,15 @@ void cmBorlandMakefileGenerator::ComputeSystemInfo()
"CMAKE_ROOT has not been defined, bad GUI or driver program");
return;
}
+ std::string outdir = m_Makefile->GetCurrentOutputDirectory();
+ if(outdir.find('-') != std::string::npos)
+ {
+ std::string message = "The Borland command line tools do not support path names that have - in them. Please re-name your output directory and use _ instead of -.";
+ message += "\nYour path currently is: ";
+ message += outdir;
+ cmSystemTools::Error(message.c_str());
+ }
+
std::string fpath =
m_Makefile->GetDefinition("CMAKE_ROOT");
fpath += "/Templates/CMakeBorlandWindowsSystemConfig.cmake";
@@ -357,11 +366,18 @@ void cmBorlandMakefileGenerator::OutputSharedLibraryRule(std::ostream& fout,
}
command += "\n|\n";
+ std::string customCommands = this->CreateTargetRules(t, name);
+ const char* cc = 0;
+ if(customCommands.size() > 0)
+ {
+ cc = customCommands.c_str();
+ }
this->OutputMakeRule(fout, "rules for a shared library",
target.c_str(),
depend.c_str(),
command.c_str(),
- command2.c_str());
+ command2.c_str(),
+ cc);
}
void cmBorlandMakefileGenerator::OutputModuleLibraryRule(std::ostream& fout,
@@ -373,7 +389,7 @@ void cmBorlandMakefileGenerator::OutputModuleLibraryRule(std::ostream& fout,
void cmBorlandMakefileGenerator::OutputStaticLibraryRule(std::ostream& fout,
const char* name,
- const cmTarget &)
+ const cmTarget &t)
{
std::string target = m_LibraryOutputPath + std::string(name) + ".lib";
cmSystemTools::ConvertToWindowsSlashes(target);
@@ -391,12 +407,18 @@ void cmBorlandMakefileGenerator::OutputStaticLibraryRule(std::ostream& fout,
command += "\n|\n";
std::string comment = "rule to build static library: ";
comment += name;
+ std::string customCommands = this->CreateTargetRules(t, name);
+ const char* cc = 0;
+ if(customCommands.size() > 0)
+ {
+ cc = customCommands.c_str();
+ }
this->OutputMakeRule(fout,
comment.c_str(),
target.c_str(),
depend.c_str(),
deleteCommand.c_str(),
- command.c_str());
+ command.c_str(), cc);
}
void cmBorlandMakefileGenerator::OutputExecutableRule(std::ostream& fout,
@@ -428,11 +450,17 @@ void cmBorlandMakefileGenerator::OutputExecutableRule(std::ostream& fout,
std::string comment = "rule to build executable: ";
comment += name;
+ std::string customCommands = this->CreateTargetRules(t, name);
+ const char* cc = 0;
+ if(customCommands.size() > 0)
+ {
+ cc = customCommands.c_str();
+ }
this->OutputMakeRule(fout,
comment.c_str(),
target.c_str(),
depend.c_str(),
- command.c_str());
+ command.c_str(), cc);
}