summaryrefslogtreecommitdiff
path: root/Source/cmQTWrapCPPCommand.cxx
diff options
context:
space:
mode:
authorIan Scott <ian.m.scott@stud.man.ac.uk>2001-10-18 13:51:09 -0400
committerIan Scott <ian.m.scott@stud.man.ac.uk>2001-10-18 13:51:09 -0400
commit8fefb3dd22599bf4e5f99551783bb2a21dcf8a59 (patch)
tree2378e8ff57d0e1905d8d6ddd62df77818481ea9b /Source/cmQTWrapCPPCommand.cxx
parent8106e93dca85f21e6112feb34972ceffddf82662 (diff)
downloadcmake-8fefb3dd22599bf4e5f99551783bb2a21dcf8a59.tar.gz
Detect error and output useful message
Previously it would have got confused about the destinationSourceGroup
Diffstat (limited to 'Source/cmQTWrapCPPCommand.cxx')
-rw-r--r--Source/cmQTWrapCPPCommand.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx
index 0ad45d38da..8592307123 100644
--- a/Source/cmQTWrapCPPCommand.cxx
+++ b/Source/cmQTWrapCPPCommand.cxx
@@ -52,7 +52,14 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& args)
// Now check and see if the value has been stored in the cache
// already, if so use that value and don't look for the program
- if(!m_Makefile->IsOn("QT_WRAP_CPP"))
+ const char* QT_WRAP_CPP_value = m_Makefile->GetDefinition("QT_WRAP_CPP");
+ if (QT_WRAP_CPP_value==0)
+ {
+ this->SetError("called with QT_WRAP_CPP undefined");
+ return false;
+ }
+
+ if(cmSystemTools::IsOff(QT_WRAP_CPP_value))
{
return true;
}
@@ -107,11 +114,11 @@ void cmQTWrapCPPCommand::FinalPass()
// first we add the rules for all the .h to Java.cxx files
int lastClass = m_WrapClasses.size();
std::vector<std::string> depends;
- std::string wjava = "${QT_MOC_EXE}";
+ std::string moc_exe = "${QT_MOC_EXE}";
// wrap all the .h files
- depends.push_back(wjava);
+ depends.push_back(moc_exe);
for(int classNum = 0; classNum < lastClass; classNum++)
{
@@ -127,7 +134,7 @@ void cmQTWrapCPPCommand::FinalPass()
args.push_back(m_WrapHeaders[classNum]);
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
- wjava.c_str(), args, depends,
+ moc_exe.c_str(), args, depends,
res.c_str(), m_LibraryName.c_str());
}