summaryrefslogtreecommitdiffstats
path: root/Source/cmCableWrapTclCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-06-06 20:45:52 (GMT)
committerBrad King <brad.king@kitware.com>2001-06-06 20:45:52 (GMT)
commit19b183808ae6780fec226d6905786e8eb64125c7 (patch)
treedcc7f74acdfb687c740376f5d24db7f63e4db7dc /Source/cmCableWrapTclCommand.cxx
parent090511748018049bb1eb0ea34f1ffad8b3563a72 (diff)
downloadCMake-19b183808ae6780fec226d6905786e8eb64125c7.zip
CMake-19b183808ae6780fec226d6905786e8eb64125c7.tar.gz
CMake-19b183808ae6780fec226d6905786e8eb64125c7.tar.bz2
ENH: Changed generation of gccxml command to write out define and include flags explicitly instead of using CMAKE_CXX_FLAGS and INCLUDE_FLAGS variables. This should help it run when gccxml is not the compiler that will build the generated wrappers.
Diffstat (limited to 'Source/cmCableWrapTclCommand.cxx')
-rw-r--r--Source/cmCableWrapTclCommand.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmCableWrapTclCommand.cxx b/Source/cmCableWrapTclCommand.cxx
index 4b696c6..5e112d2 100644
--- a/Source/cmCableWrapTclCommand.cxx
+++ b/Source/cmCableWrapTclCommand.cxx
@@ -257,7 +257,20 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name,
std::vector<std::string> depends;
depends.push_back(command);
command = cmSystemTools::EscapeSpaces(command.c_str());
- command += " ${CMAKE_CXXFLAGS} ${INCLUDE_FLAGS} -fsyntax-only -fxml=" + classXmlName + " " + classCxxName;
+
+ std::string defineFlags = m_Makefile->GetDefineFlags();
+ std::string includeFlags = "-I";
+ includeFlags += m_Makefile->GetStartDirectory();
+
+ const std::vector<std::string>& includes = m_Makefile->GetIncludeDirectories();
+ for(std::vector<std::string>::const_iterator i = includes.begin();
+ i != includes.end(); ++i)
+ {
+ includeFlags += " -I";
+ includeFlags += cmSystemTools::EscapeSpaces(i->c_str());
+ }
+
+ command += " "+defineFlags+" "+includeFlags+" -fsyntax-only -fxml="+classXmlName+" "+classCxxName;
std::vector<std::string> outputs;
outputs.push_back(classXmlName);