summaryrefslogtreecommitdiffstats
path: root/Source/cmCablePackageCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-04-26 19:27:38 (GMT)
committerBrad King <brad.king@kitware.com>2001-04-26 19:27:38 (GMT)
commit61d23149893dcba75115486187a39ce853e091b9 (patch)
tree64bd472802296213e0189094f3592e28cd25e9fe /Source/cmCablePackageCommand.cxx
parent2c1fb789d7a182ab0df53aad474a657d59d894b0 (diff)
downloadCMake-61d23149893dcba75115486187a39ce853e091b9.zip
CMake-61d23149893dcba75115486187a39ce853e091b9.tar.gz
CMake-61d23149893dcba75115486187a39ce853e091b9.tar.bz2
ENH: Changed WriteConfiguration to non-const so it can do error checking. Added parsing and output of a name for each WrapperSet generated from a CABLE_WRAP command.
Diffstat (limited to 'Source/cmCablePackageCommand.cxx')
-rw-r--r--Source/cmCablePackageCommand.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmCablePackageCommand.cxx b/Source/cmCablePackageCommand.cxx
index 1808dee..6776fc3 100644
--- a/Source/cmCablePackageCommand.cxx
+++ b/Source/cmCablePackageCommand.cxx
@@ -100,6 +100,7 @@ bool cmCablePackageCommand::Invoke(std::vector<std::string>& args)
// Add custom rules to the makefile to generate this package's source
// files.
+ {
std::string command = "${CABLE}";
m_Makefile->ExpandVariablesInString(command);
std::vector<std::string> depends;
@@ -115,6 +116,27 @@ bool cmCablePackageCommand::Invoke(std::vector<std::string>& args)
command.c_str(),
depends,
outputs, m_TargetName.c_str());
+ }
+
+ // Add custom rules to the makefile to generate this package's xml files.
+ {
+ std::string command = "${GCCXML}";
+ m_Makefile->ExpandVariablesInString(command);
+ std::vector<std::string> depends;
+ depends.push_back(command);
+ std::string input = "Cxx/"+m_PackageName+"_cxx.cxx";
+ std::string output = "Cxx/"+m_PackageName+"_cxx.xml";
+ command = "\""+command+"\" ${CXX_FLAGS} -fsyntax-only -fxml=" + output + " -c " + input;
+
+ std::vector<std::string> outputs;
+ outputs.push_back("Cxx/"+m_PackageName+"_cxx.xml");
+
+ // A rule for the package's source files.
+ m_Makefile->AddCustomCommand(input.c_str(),
+ command.c_str(),
+ depends,
+ outputs, m_TargetName.c_str());
+ }
// add the source list to the target
m_Makefile->GetTargets()[m_TargetName.c_str()].GetSourceLists().push_back(m_PackageName);