diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index c9251678af..31049d3920 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -2,7 +2,19 @@ class CompileCommandParser { public: - typedef std::map CommandType; + class CommandType: public std::map + { + public: +#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ < 4 + cmStdString const& at(cmStdString const& k) const + { + const_iterator i = this->find(k); + if(i != this->end()) { return i->second; } + static cmStdString empty; + return empty; + } +#endif + }; typedef std::vector TranslationUnitsType; CompileCommandParser(std::ifstream *input)