Example #1
0
     minor = -1
     generator = cmakeGenerator
     extraGenerator = ''
     sourceDirectory = sourceDir
     buildDirectory = buildDir
     if 'major' in data: major = data['major']
     if 'minor' in data: minor = data['minor']
     if 'buildDirectory' in data: buildDirectory = data['buildDirectory']
     if 'sourceDirectory' in data: sourceDirectory = data['sourceDirectory']
     if 'generator' in data: generator = data['generator']
     if 'extraGenerator' in data: extraGenerator = data['extraGenerator']
     if not os.path.isabs(buildDirectory):
         buildDirectory = buildDir + "/" + buildDirectory
     if sourceDirectory != '' and not os.path.isabs(sourceDirectory):
         sourceDirectory = sourceDir + "/" + sourceDirectory
     cmakelib.handshake(proc, major, minor, sourceDirectory, buildDirectory,
       generator, extraGenerator)
 elif 'validateGlobalSettings' in obj:
     data = obj['validateGlobalSettings']
     if not 'buildDirectory' in data: data['buildDirectory'] = buildDir
     if not 'sourceDirectory' in data: data['sourceDirectory'] = sourceDir
     if not 'generator' in data: data['generator'] = cmakeGenerator
     if not 'extraGenerator' in data: data['extraGenerator'] = ''
     cmakelib.validateGlobalSettings(proc, cmakeCommand, data)
 elif 'validateCache' in obj:
     data = obj['validateCache']
     if not 'isEmpty' in data: data['isEmpty'] = false
     cmakelib.validateCache(proc, data)
 elif 'message' in obj:
     print("MESSAGE:", obj["message"])
 elif 'reconnect' in obj:
     cmakelib.exitProc(proc)
Example #2
0
        cmakelib.waitForError(proc, originalType, cookie, message)
    elif 'progress' in obj:
        data = obj['progress']
        if debug: print("Waiting for progress:", json.dumps(data))
        originalType = ''
        cookie = ""
        current = 0
        message = ""
        if 'cookie' in data: cookie = data['cookie']
        if 'type' in data: originalType = data['type']
        if 'current' in data: current = data['current']
        if 'message' in data: message = data['message']
        cmakelib.waitForProgress(proc, originalType, cookie, current, message)
    elif 'handshake' in obj:
        data = obj['handshake']
        if debug: print("Doing handshake:", json.dumps(data))
        major = -1
        minor = -1
        if 'major' in data: major = data['major']
        if 'minor' in data: minor = data['minor']
        cmakelib.handshake(proc, major, minor)
    elif 'message' in obj:
        print("MESSAGE:", obj["message"])
    else:
        print("Unknown command:", json.dumps(obj))
        sys.exit(2)

    print("Completed")

sys.exit(0)