From kde-commits Sat Mar 31 10:34:44 2012 From: =?utf-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sat, 31 Mar 2012 10:34:44 +0000 To: kde-commits Subject: icecream/client Message-Id: <20120331103444.EFD72AC89A () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=133319020402887 SVN commit 1287752 by lunakl: the first icecc argument must be the compiler, if it's not icecc option This is only about when invoked as icecc of course, not as wrapper symlink. M +1 -21 main.cpp --- trunk/icecream/client/main.cpp #1287751:1287752 @@ -224,29 +224,9 @@ } if ( arg == "--build-native" ) return create_native(); - if ( arg.size() > 0 ) { - if ( arg.at(0) == '/' ) + if ( arg.size() > 0 ) job.setCompilerName(arg); - else { - const char* env; - if ( (env = getenv( "ICECC_CC" )) && env == arg ) - job.setCompilerName(arg); - if ( (env = getenv( "ICECC_CXX" )) && env == arg ) - job.setCompilerName(arg); - if ( arg.at(0) != '-' && arg.find( '/' ) == string::npos ) { - char* path = getenv( "PATH" ); - for( char* dir = strtok( path, ":" ); dir; - dir = strtok( NULL, ":" )) { - if ( access(( string( dir ) + "/" + arg ).c_str(), - X_OK ) == 0 ) { - job.setCompilerName( arg ); - break; } - } - } - } - } - } } else if ( find_basename( compiler_name ) == "icerun") { icerun = true; if ( argc > 1 ) {