diff options
author | Brad King <brad.king@kitware.com> | 2001-07-23 18:43:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-07-23 18:43:23 (GMT) |
commit | 9adacc17f899270691f9dfd4d9dfbb1de6920682 (patch) | |
tree | cf60a5ea0284bd85ce2fa6e298eea09f9888975b /Source/cmConfigureGccXmlCommand.cxx | |
parent | 4a52b0e6c3f732a7b656c467ce32d7ee89673cf6 (diff) | |
download | CMake-9adacc17f899270691f9dfd4d9dfbb1de6920682.zip CMake-9adacc17f899270691f9dfd4d9dfbb1de6920682.tar.gz CMake-9adacc17f899270691f9dfd4d9dfbb1de6920682.tar.bz2 |
BUG: CompilerIsMipsPro needs to redirect stderr to stdout so that the test output can be checked.
Diffstat (limited to 'Source/cmConfigureGccXmlCommand.cxx')
-rw-r--r-- | Source/cmConfigureGccXmlCommand.cxx | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/Source/cmConfigureGccXmlCommand.cxx b/Source/cmConfigureGccXmlCommand.cxx index c5f6a6e..6523e5d 100644 --- a/Source/cmConfigureGccXmlCommand.cxx +++ b/Source/cmConfigureGccXmlCommand.cxx @@ -67,34 +67,29 @@ bool cmConfigureGccXmlCommand::InitialPass(std::vector<std::string>& args) // Get the gccxml support directory location. This is based on the // executable location. - m_SupportDir = this->GetSupportDirectory(args[0].c_str()); + if(!this->GetSupportDirectory(args[0].c_str())) + { return false; } #if defined(_WIN32) && !defined(__CYGWIN__) // On Windows, we will just look at VcInclude/FLAGS.txt for now. if(!this->FindVcIncludeFlags()) - { - return false; - } + { return false; } #else // On UNIX, we have to determine which compiler is being used, and // attempt to use that compiler's support directory. if(this->CompilerIsGCC()) { if(!this->FindGccIncludeFlags()) - { - return false; - } + { return false; } } else if(this->CompilerIsMipsPro()) { if(!this->FindMproIncludeFlags()) - { - return false; - } + { return false; } } else { - this->SetError("Compiler is not supported by GCC-XML!"); + this->SetError("Compiler is not supported by GCC-XML!\n"); return false; } #endif @@ -116,10 +111,18 @@ bool cmConfigureGccXmlCommand::InitialPass(std::vector<std::string>& args) * support library tree. Subdirectories of the returned location should * contain the compiler-specific support libraries. */ -std::string cmConfigureGccXmlCommand::GetSupportDirectory(const char* exeLoc) +bool cmConfigureGccXmlCommand::GetSupportDirectory(const char* exeLoc) { std::string gccxml = exeLoc; m_Makefile->ExpandVariablesInString(gccxml); + + if(!cmSystemTools::FileExists(gccxml.c_str())) + { + std::string err = "Can't find GCC-XML at given path: "; + err += gccxml; + this->SetError(err.c_str()); + return false; + } std::string dir; std::string file; @@ -137,7 +140,8 @@ std::string cmConfigureGccXmlCommand::GetSupportDirectory(const char* exeLoc) } #endif - return dir; + m_SupportDir = dir; + return true; } @@ -249,7 +253,7 @@ bool cmConfigureGccXmlCommand::CompilerIsMipsPro() const const char* compiler = m_Makefile->GetDefinition("CMAKE_CXX_COMPILER"); if(!compiler) { return false; } std::string command = compiler; - command += " -version"; + command += " -version 2>&1"; std::string output; if(!cmSystemTools::RunCommand(command.c_str(), output, false)) { return false; } |