def run_gen(cfg, fips_dir, project_dir, build_dir, toolchain_path, defines) :
    """run cmake tool to generate build files
    
    :param cfg:             a fips config object
    :param project_dir:     absolute path to project (must have root CMakeLists.txt file)
    :param build_dir:       absolute path to build directory (where cmake files are generated)
    :param toolchain:       toolchain path or None
    :returns:               True if cmake returned successful
    """
    cmdLine = 'cmake'
    if cfg['generator'] != 'Default' :
        cmdLine += ' -G "{}"'.format(cfg['generator'])
    if cfg['generator-platform'] :
        cmdLine += ' -A "{}"'.format(cfg['generator-platform'])
    if cfg['generator-toolset'] :
        cmdLine += ' -T "{}"'.format(cfg['generator-toolset'])
    cmdLine += ' -DCMAKE_BUILD_TYPE={}'.format(cfg['build_type'])
    if cfg['build_tool'] == 'ninja' and platform.system() == 'Windows':
        cmdLine += ' -DCMAKE_MAKE_PROGRAM={}'.format(ninja.get_ninja_tool(fips_dir)) 
    if toolchain_path is not None :
        cmdLine += ' -DCMAKE_TOOLCHAIN_FILE={}'.format(toolchain_path)
    cmdLine += ' -DFIPS_CONFIG={}'.format(cfg['name'])
    if cfg['defines'] == None :
        for key in cfg['defines'] :
            val = cfg['defines'][key]
            if type(val) is bool :
                cmdLine += ' -D{}={}'.format(key, 'ON' if val else 'OFF')
            else :
                cmdLine += ' -D{}={}'.format(key, val)
    for key in defines :
        cmdLine += ' -D{}={}'.format(key, defines[key])
    cmdLine += ' -B' + build_dir
    cmdLine += ' -H' + project_dir

    print(cmdLine)
    res = subprocess.call(cmdLine, cwd=build_dir, shell=True)
    return res == 0

#------------------------------------------------------------------------------
dataset/ETHPy150Open floooh/fips/mod/tools/cmake.py/run_gen/operator `is not` -> `==`