[Compbench-devel] CompBenchmarks++/Benchmark/Compiler BenchmarkContext-CompilerGCC.cpp, 1.5, 1.6
Brought to you by:
xfred
|
From: Frederic T. <xf...@us...> - 2006-09-26 16:01:39
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21974 Modified Files: BenchmarkContext-CompilerGCC.cpp Log Message: Prefix name by gcc/g++ when a vanilla GCC is used. Index: BenchmarkContext-CompilerGCC.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Compiler/BenchmarkContext-CompilerGCC.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BenchmarkContext-CompilerGCC.cpp 18 Sep 2006 18:57:39 -0000 1.5 --- BenchmarkContext-CompilerGCC.cpp 26 Sep 2006 16:01:28 -0000 1.6 *************** *** 21,24 **** --- 21,25 ---- std::string cmd = compilerBinary; std::string result; + std::string tmp; cmd+=" --version | "; *************** *** 26,29 **** --- 27,36 ---- cmd+=" -1"; system->exec(cmd, result); /* !!! */ + + if ((int) result.find("gcc")<0) { + tmp="gcc "; + tmp+=result; + result=tmp; + } return(result); } *************** *** 76,79 **** --- 83,87 ---- std::string cmd = compilerBinary; std::string result; + std::string tmp; cmd+=" --version | "; *************** *** 81,84 **** --- 89,98 ---- cmd+=" -1"; system->exec(cmd, result); /* !!! */ + + if ((int) result.find("g++")<0) { + tmp="g++ "; + tmp+=result; + result=tmp; + } return(result); } |