diff options
author | Brad King <brad.king@kitware.com> | 2001-03-19 15:09:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-03-19 15:09:43 (GMT) |
commit | a8f9aa814e7362701b1c8b8271e12d12eff09c04 (patch) | |
tree | 60e762087f5c7428f817d1f252498c28b577451e /Source | |
parent | 9312a7706b23f85a4230ada5a4f41457c4b4bd32 (diff) | |
download | CMake-a8f9aa814e7362701b1c8b8271e12d12eff09c04.zip CMake-a8f9aa814e7362701b1c8b8271e12d12eff09c04.tar.gz CMake-a8f9aa814e7362701b1c8b8271e12d12eff09c04.tar.bz2 |
ENH: Added generation of a rule to re-run CMake if the cable_config.xml file is missing.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCableCommand.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/cmCableCommand.cxx b/Source/cmCableCommand.cxx index 3f4be4e..2d22308 100644 --- a/Source/cmCableCommand.cxx +++ b/Source/cmCableCommand.cxx @@ -78,4 +78,30 @@ void cmCableCommand::SetupCableData() // command as its owner. pathName += "/cable_config.xml"; m_CableData = new cmCableData(this, pathName); + + // We must add a custom rule to cause the cable_config.xml to be re-built + // when it is removed. Rebuilding it means re-running CMake. + std::string cMakeLists = m_Makefile->GetStartDirectory(); + cMakeLists += "/"; + cMakeLists += "CMakeLists.txt"; + std::string command = m_Makefile->GetHomeOutputDirectory(); + command += "/CMake/Source/"; + command += cmSystemTools::GetCMakeExecutableName(); + command += " " + cMakeLists; + command += " "; + command += cmSystemTools::GetCMakeExecutableOptions(); + command += " -H"; + command += m_Makefile->GetHomeDirectory(); + command += " -S"; + command += m_Makefile->GetStartDirectory(); + command += " -O"; + command += m_Makefile->GetStartOutputDirectory(); + command += " -B"; + command += m_Makefile->GetHomeOutputDirectory(); + + std::vector<std::string> depends; + m_Makefile->AddCustomCommand(cMakeLists.c_str(), + "cable_config.xml", + command.c_str(), + depends); } |