def read_cmake_defines(fips_dir, proj_dir, cfg): '''reads the fips_defines.yml file which was created during "fips gen" and returns map of unique top-level defines. ''' result = [] success, defs = util.get_cfg_defines_by_target(fips_dir, proj_dir, cfg) if success: log.info(' defines from cmake:') for _, val in defs.items(): if val: for define in val: if define not in result: result.append(define) log.info(' {}'.format(define)) if 'vscode_additional_defines' in cfg: log.info(' defines from build config (vscode_additional_defines):') for define in cfg['vscode_additional_defines']: if define not in result: result.append(define) log.info(' {}'.format(define)) else: log.info( ' no additional defines from build config (vscode_additional_defines)' ) return result
def read_cmake_defines(fips_dir, proj_dir, cfg): '''reads the fips_defines.yml file which was created during "fips gen" and returns map of unique top-level defines. ''' result = [] success, defs = util.get_cfg_defines_by_target(fips_dir, proj_dir, cfg) if success: for _,val in defs.items(): if val: result.extend(val) return set(result)
def read_cmake_defines(fips_dir, proj_dir, cfg): '''reads the fips_defines.yml file which was created during "fips gen" and returns map of unique top-level defines. ''' result = [] success, defs = util.get_cfg_defines_by_target(fips_dir, proj_dir, cfg) if success: log.info(' defines from cmake:') for _,val in defs.items(): if val: for define in val: if define not in result: result.append(define) log.info(' {}'.format(define)) if 'vscode_additional_defines' in cfg: log.info(' defines from build config (vscode_additional_defines):') for define in cfg['vscode_additional_defines']: if define not in result: result.append(define) log.info(' {}'.format(define)) else: log.info(' no additional defines from build config (vscode_additional_defines)') return result