diff options
author | Brad King <brad.king@kitware.com> | 2001-07-26 15:07:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-07-26 15:07:18 (GMT) |
commit | 6d54c3d6f8b03b137368c5868454f727ef707ceb (patch) | |
tree | 44496e16a8d409de5b9bc7999e92a7a53f67ee31 /Source/cmCableWrapTclCommand.cxx | |
parent | cb858f511ed262977eac99b5a3800f549702ec62 (diff) | |
download | CMake-6d54c3d6f8b03b137368c5868454f727ef707ceb.zip CMake-6d54c3d6f8b03b137368c5868454f727ef707ceb.tar.gz CMake-6d54c3d6f8b03b137368c5868454f727ef707ceb.tar.bz2 |
ENH: Added cable class-set expansion and tagging for alternate name generation. This should make the generated wrappers much easier to setup and use.
Diffstat (limited to 'Source/cmCableWrapTclCommand.cxx')
-rw-r--r-- | Source/cmCableWrapTclCommand.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmCableWrapTclCommand.cxx b/Source/cmCableWrapTclCommand.cxx index f9e7f05..feb24c8 100644 --- a/Source/cmCableWrapTclCommand.cxx +++ b/Source/cmCableWrapTclCommand.cxx @@ -67,6 +67,13 @@ bool cmCableWrapTclCommand::InitialPass(std::vector<std::string>& args) this->SetError("called with incorrect number of arguments"); return false; } + + // First, we want to expand all CMAKE variables in all arguments. + for(std::vector<std::string>::iterator a = args.begin(); + a != args.end(); ++a) + { + m_Makefile->ExpandVariablesInString(*a); + } // Prepare to iterate through the arguments. std::vector<std::string>::const_iterator arg = args.begin(); @@ -167,7 +174,7 @@ void cmCableWrapTclCommand::GenerateCableFiles() const for(cmCableClassSet::CableClassMap::const_iterator c = m_CableClassSet->Begin(); c != m_CableClassSet->End(); ++c, ++index) { - this->GenerateCableClassFiles(c->first.c_str(), c->second, index); + this->GenerateCableClassFiles(c->first.c_str(), *(c->second), index); } } @@ -204,7 +211,14 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name, " <Header name=\"" << source->c_str() << "\"/>\n"; } classConfig << - " <Class name=\"_wrap_::wrapper::Wrapper\"/>\n" + " <Class name=\"_wrap_::wrapper::Wrapper\">\n"; + if(c.GetTag() != "") + { + classConfig << + " <AlternateName name=\"" << c.GetTag().c_str() << "\"/>\n"; + } + classConfig << + " </Class>\n" "</CableConfiguration>\n"; classConfig.close(); |