(project_name, project_path)
| 128 | |
| 129 | |
| 130 | def CLGenWorkspace(project_name, project_path): |
| 131 | if os.path.isfile('codelite_template.workspace'): |
| 132 | tree = etree.parse('codelite_template.workspace') |
| 133 | else: |
| 134 | tree = etree.parse(os.path.join(os.path.dirname(__file__), 'codelite_template.workspace')) |
| 135 | |
| 136 | root = tree.getroot() |
| 137 | root.attrib['Name'] = project_name |
| 138 | |
| 139 | node = root.find('Project') |
| 140 | node.attrib['Name'] = project_name |
| 141 | node.attrib['Path'] = project_name + '.project' |
| 142 | |
| 143 | node = root.find('BuildMatrix').find('WorkspaceConfiguration').find('Project') |
| 144 | node.attrib['Name'] = project_name |
| 145 | |
| 146 | out = open(project_name + '.workspace', 'w') |
| 147 | out.write('<?xml version="1.0" encoding="UTF-8"?>\n') |
| 148 | xml_indent(root) |
| 149 | out.write(etree.tostring(root, encoding='utf-8')) |
| 150 | out.close() |
| 151 | |
| 152 | def TargetCodelite(script, program): |
| 153 | project_name = os.path.abspath('.').replace('\\', '/').split('/')[-1] |
no test coverage detected