ENH: Added generation of dependencies on the CMake-generated input to gcc-xml so that re-generation of wrappers will occur if a header changes.
This commit is contained in:
parent
7df455251b
commit
21d634c525
|
@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "cmCacheManager.h"
|
#include "cmCacheManager.h"
|
||||||
#include "cmTarget.h"
|
#include "cmTarget.h"
|
||||||
#include "cmGeneratedFileStream.h"
|
#include "cmGeneratedFileStream.h"
|
||||||
|
#include "cmMakeDepend.h"
|
||||||
|
|
||||||
cmCableWrapTclCommand::cmCableWrapTclCommand():
|
cmCableWrapTclCommand::cmCableWrapTclCommand():
|
||||||
m_CableClassSet(NULL)
|
m_CableClassSet(NULL)
|
||||||
|
@ -257,6 +257,26 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name,
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
depends.push_back(command);
|
depends.push_back(command);
|
||||||
|
|
||||||
|
// Get the dependencies of the file.
|
||||||
|
cmMakeDepend md;
|
||||||
|
md.SetMakefile(m_Makefile);
|
||||||
|
const cmDependInformation* dependInfo =
|
||||||
|
md.FindDependencies(classCxxName.c_str());
|
||||||
|
if(dependInfo)
|
||||||
|
{
|
||||||
|
for(cmDependInformation::DependencySet::const_iterator d =
|
||||||
|
dependInfo->m_DependencySet.begin();
|
||||||
|
d != dependInfo->m_DependencySet.end(); ++d)
|
||||||
|
{
|
||||||
|
// Make sure the full path is given. If not, the dependency was
|
||||||
|
// not found.
|
||||||
|
if((*d)->m_FullPath != "")
|
||||||
|
{
|
||||||
|
depends.push_back((*d)->m_FullPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string commandArgs = this->GetGccXmlFlagsFromCache();
|
std::string commandArgs = this->GetGccXmlFlagsFromCache();
|
||||||
commandArgs += " ";
|
commandArgs += " ";
|
||||||
commandArgs += m_Makefile->GetDefineFlags();
|
commandArgs += m_Makefile->GetDefineFlags();
|
||||||
|
|
Loading…
Reference in New Issue