scanclrmake/src/idcompiler.cxx
static bool tryOther(const string &actual_path, string &id, bool verbose)
{
    // Form the command filename and args for the Perl script.
    string plcmd = scanclrmake::psethome();
    scanclrmake::appendNameInDir(plcmd, "bin");
    scanclrmake::appendNameInDir(plcmd, "disperl");
    string tryCompilerScript = scanclrmake::psethome();
    scanclrmake::appendNameInDir(tryCompilerScript, "mb");
    scanclrmake::appendNameInDir(tryCompilerScript, "trycompiler.pl");
    static const char *argv[] = { 
        NULL, // script path
	scanclrmake::platformName(),
	NULL, // actual path
	NULL };
    argv[0] = tryCompilerScript.c_str();
    argv[2] = actual_path.c_str();

    int result = start_process_and_wait(plcmd.c_str(), argv, &id);
    if (result == 0) {
	one_line(id);
	scanclrmake::trim(id);
	if (id.length() > 0) {
	    return true;
        }
    }
    if (verbose) {
	// Hard to tell catastrophic failure from a simple case
	// of not encountering an actual compiler.
	msg("trycompiler command failed with result $5: $1 $2 $3 $4\n", warning_sev)
            << plcmd << eoarg << tryCompilerScript << eoarg
            << scanclrmake::platformName() << eoarg << actual_path << eoarg
            << result << eoarg << eom;
    }
    return false;
}
// ==========================================================================
// Invoke a script to determine what compiler is represented by the given
// compiler path name (already determined not to be gcc).  This takes into
// account the current platform. If it is a known compiler, returns true
// and sets id as per the script, i.e. with the name of the compiler used
// for configuration purposes, e.g. suncc.
//
Invoke a script to determine what compiler is represented by the given
compiler path name (already determined not to be gcc).  This takes into
account the current platform. If it is a known compiler, returns true
and sets id as per the script, i.e. with the name of the compiler used
for configuration purposes, e.g. suncc.
Invoke a script to determine what compiler is represented by the given compiler path name ( already determined not to be gcc ) . This takes into account the current platform . If it is a known compiler returns true and sets id as per the script i . e . with the name of the compiler used for configuration purposes e . g . suncc .
static bool tryOther(const string &actual_path, string &id, bool verbose)
{
    string plcmd = scanclrmake::psethome();
    scanclrmake::appendNameInDir(plcmd, "bin");
    scanclrmake::appendNameInDir(plcmd, "disperl");
    string tryCompilerScript = scanclrmake::psethome();
    scanclrmake::appendNameInDir(tryCompilerScript, "mb");
    scanclrmake::appendNameInDir(tryCompilerScript, "trycompiler.pl");
    static const char *argv[] = { 
        NULL, 
	scanclrmake::platformName(),
	NULL, 
	NULL };
    argv[0] = tryCompilerScript.c_str();
    argv[2] = actual_path.c_str();
    int result = start_process_and_wait(plcmd.c_str(), argv, &id);
    if (result == 0) {
	one_line(id);
	scanclrmake::trim(id);
	if (id.length() > 0) {
	    return true;
        }
    }
    if (verbose) {
	msg("trycompiler command failed with result $5: $1 $2 $3 $4\n", warning_sev)
            << plcmd << eoarg << tryCompilerScript << eoarg
            << scanclrmake::platformName() << eoarg << actual_path << eoarg
            << result << eoarg << eom;
    }
    return false;
}
static bool tryOther ( const string & actual_path , string & id , bool verbose ) { string plcmd = scanclrmake :: psethome ( ) ; scanclrmake :: appendNameInDir ( plcmd , " " ) ; scanclrmake :: appendNameInDir ( plcmd , " " ) ; string tryCompilerScript = scanclrmake :: psethome ( ) ; scanclrmake :: appendNameInDir ( tryCompilerScript , " " ) ; scanclrmake :: appendNameInDir ( tryCompilerScript , " " ) ; static const char * argv [ ] = { NULL , scanclrmake :: platformName ( ) , NULL , NULL } ; argv [ 0 ] = tryCompilerScript . c_str ( ) ; argv [ 2 ] = actual_path . c_str ( ) ; int result = start_process_and_wait ( plcmd . c_str ( ) , argv , & id ) ; if ( result == 0 ) { one_line ( id ) ; scanclrmake :: trim ( id ) ; if ( id . length ( ) > 0 ) { return true ; } } if ( verbose ) { msg ( " \n " , warning_sev ) << plcmd << eoarg << tryCompilerScript << eoarg << scanclrmake :: platformName ( ) << eoarg << actual_path << eoarg << result << eoarg << eom ; } return false ; }
Invoke a script to determine what compiler is represented by the given
compiler path name (already determined not to be gcc).
Invoke a script to determine what compiler is represented by the given compiler path name ( already determined not to be gcc ) .
// Form the command filename and args for the Perl script. // script path // actual path // Hard to tell catastrophic failure from a simple case // of not encountering an actual compiler.