def validate_arguments( vArgv ):
    dbg = utilsDebug.CDebugFnVerbose( "validate_arguments()" );
    strMsg = "";
    dictArgs = {};
    nResult = 0;
    strListArgs = "hdm"; # Format "hiox:" = -h -i -o -x <arg>
    listLongArgs = ["srcRoot=", "targetDir=", "cfgBldDir=", "prefix=", "cmakeBuildConfiguration=",
                    "argsFile", "buildConfig="];
    dictArgReq = {  "-h": "o",          # o = optional, m = mandatory
                    "-d": "o",
                    "-m": "o",
                    "--srcRoot": "m",
                    "--targetDir": "m",
                    "--cfgBldDir": "o",
                    "--buildConfig": "m",
                    "--prefix": "o",
                    "--cmakeBuildConfiguration": "o",
                    "--argsFile": "o" };

    # Check for mandatory parameters
    nResult, dictArgs, strMsg = utilsArgsParse.parse( vArgv, strListArgs,
                                                      listLongArgs,
                                                      dictArgReq,
                                                      strHelpInfo );
    if nResult < 0:
        program_exit_on_failure( nResult, strMsg );

    # User input -h for help
    if nResult == 1:
        program_exit_success( 0, strMsg );

    return (nResult, dictArgs);
Exemplo n.º 2
0
def validate_arguments(vArgv):
    dbg = utilsDebug.CDebugFnVerbose("validate_arguments()")
    strMsg = ""
    dictArgs = {}
    nResult = 0
    strListArgs = "hdmM" # Format "hiox:" = -h -i -o -x <arg>
    listLongArgs = ["srcRoot=", "targetDir=", "cfgBldDir=", "prefix=",
            "swigExecutable=", "argsFile"]
    dictArgReq = {"-h": "o",          # o = optional, m = mandatory
                  "-d": "o",
                  "-m": "o",
                  "-M": "o",
                  "--srcRoot": "m",
                  "--targetDir": "m",
                  "--swigExecutable" : "o",
                  "--cfgBldDir": "o",
                  "--prefix": "o",
                  "--argsFile": "o"}
    strHelpInfo = get_help_information()

    # Check for mandatory parameters
    nResult, dictArgs, strMsg = utilsArgsParse.parse(vArgv, strListArgs,
                                                     listLongArgs,
                                                     dictArgReq,
                                                     strHelpInfo)
    if nResult < 0:
        program_exit_on_failure(nResult, strMsg)

    # User input -h for help
    if nResult == 1:
        program_exit_success(0, strMsg)

    return (nResult, dictArgs)
def validate_arguments( vArgv ):
	dbg = utilsDebug.CDebugFnVerbose( "validate_arguments()" );
	strMsg = "";
	dictArgs = {};
	nResult = 0;
	strListArgs = "hdmM"; # Format "hiox:" = -h -i -o -x <arg>
	listLongArgs = ["srcRoot=", "targetDir=", "cfgBldDir=", "prefix=",
			"swigExecutable=", "argsFile"];
	dictArgReq = {	"-h": "o",			# o = optional, m = mandatory
					"-d": "o",
					"-m": "o",
					"-M": "o",
					"--srcRoot": "m",
					"--targetDir": "m",
					"--swigExecutable" : "o",
					"--cfgBldDir": "o",
					"--prefix": "o",
					"--argsFile": "o" };
	strHelpInfo = get_help_information();
	
	# Check for mandatory parameters
	nResult, dictArgs, strMsg = utilsArgsParse.parse( vArgv, strListArgs,
													  listLongArgs,
													  dictArgReq,
													  strHelpInfo );
	if nResult < 0:
		program_exit_on_failure( nResult, strMsg );
	
	# User input -h for help
	if nResult == 1:
		program_exit_success( 0, strMsg );
		
	return (nResult, dictArgs);
Exemplo n.º 4
0
def validate_arguments(vArgv):
    dbg = utilsDebug.CDebugFnVerbose("validate_arguments()")
    strMsg = ""
    dictArgs = {}
    nResult = 0
    strListArgs = "hdm" # Format "hiox:" = -h -i -o -x <arg>
    listLongArgs = ["srcRoot=", "targetDir=", "cfgBldDir=", "prefix=", "cmakeBuildConfiguration=",
                    "lldbLibDir=", "argsFile"]
    dictArgReq = {  "-h": "o",          # o = optional, m = mandatory
                    "-d": "o",
                    "-m": "o",
                    "--srcRoot": "m",
                    "--targetDir": "m",
                    "--cfgBldDir": "o",
                    "--prefix": "o",
                    "--cmakeBuildConfiguration": "o",
                    "--lldbLibDir": "o",
                    "--argsFile": "o" }

    # Check for mandatory parameters
    nResult, dictArgs, strMsg = utilsArgsParse.parse(vArgv, strListArgs,
                                                     listLongArgs,
                                                     dictArgReq,
                                                     strHelpInfo)
    if nResult < 0:
        program_exit_on_failure(nResult, strMsg)

    # User input -h for help
    if nResult == 1:
        program_exit_success(0, strMsg)

    return (nResult, dictArgs)