BUG: Removed output of GCC_XML rules when the command cannot be found.
This commit is contained in:
parent
2f42d7ffcb
commit
244892bc3b
|
@ -73,9 +73,10 @@ bool cmCablePackageCommand::Invoke(std::vector<std::string>& args)
|
||||||
{
|
{
|
||||||
// We must add a custom rule to cause the cable_config.xml to be re-built
|
// 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.
|
// when it is removed. Rebuilding it means re-running CMake.
|
||||||
std::string cMakeLists = m_Makefile->GetStartDirectory();
|
std::string cMakeLists = "\"";
|
||||||
|
cMakeLists += m_Makefile->GetStartDirectory();
|
||||||
cMakeLists += "/";
|
cMakeLists += "/";
|
||||||
cMakeLists += "CMakeLists.txt";
|
cMakeLists += "CMakeLists.txt\"";
|
||||||
|
|
||||||
std::string command;
|
std::string command;
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
|
@ -147,20 +148,25 @@ bool cmCablePackageCommand::Invoke(std::vector<std::string>& args)
|
||||||
{
|
{
|
||||||
std::string command = "${GCCXML}";
|
std::string command = "${GCCXML}";
|
||||||
m_Makefile->ExpandVariablesInString(command);
|
m_Makefile->ExpandVariablesInString(command);
|
||||||
std::vector<std::string> depends;
|
// Only add the rule if GCC-XML is available.
|
||||||
depends.push_back(command);
|
if((command != "") && (command != "${GCCXML}"))
|
||||||
std::string input = "Cxx/"+m_PackageName+"_cxx.cxx";
|
{
|
||||||
std::string output = "Cxx/"+m_PackageName+"_cxx.xml";
|
std::vector<std::string> depends;
|
||||||
command = "\""+command+"\" ${CXX_FLAGS} -fsyntax-only -fxml=" + output + " -c " + input;
|
depends.push_back(command);
|
||||||
|
std::string input = m_Makefile->GetStartOutputDirectory();
|
||||||
std::vector<std::string> outputs;
|
input = input + "/Cxx/"+m_PackageName+"_cxx.cxx";
|
||||||
outputs.push_back("Cxx/"+m_PackageName+"_cxx.xml");
|
std::string output = "Cxx/"+m_PackageName+"_cxx.xml";
|
||||||
|
command = "\""+command+"\" ${CXX_FLAGS} -fsyntax-only -fxml=" + output + " -c " + input;
|
||||||
// A rule for the package's source files.
|
|
||||||
m_Makefile->AddCustomCommand(input.c_str(),
|
std::vector<std::string> outputs;
|
||||||
command.c_str(),
|
outputs.push_back("Cxx/"+m_PackageName+"_cxx.xml");
|
||||||
depends,
|
|
||||||
outputs, m_TargetName.c_str());
|
// 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
|
// add the source list to the target
|
||||||
|
|
Loading…
Reference in New Issue