(sources_dir, exclude_names=None)
| 189 | |
| 190 | |
| 191 | def get_sources(sources_dir, exclude_names=None): |
| 192 | if not exclude_names: |
| 193 | exclude_names = list() |
| 194 | sources = glob.glob(os.path.join(sources_dir, "*.cpp")) |
| 195 | if MAC: |
| 196 | sources.extend(glob.glob(os.path.join(sources_dir, "*.mm"))) |
| 197 | ret = list() |
| 198 | for source_file in sources: |
| 199 | filename = os.path.basename(source_file) |
| 200 | if "_win.cpp" in filename and not WINDOWS: |
| 201 | continue |
| 202 | if "_linux.cpp" in filename and not LINUX: |
| 203 | continue |
| 204 | if "x11" in filename and not LINUX: |
| 205 | continue |
| 206 | if "gtk" in filename and not LINUX: |
| 207 | continue |
| 208 | if "_mac.cpp" in filename and not MAC: |
| 209 | continue |
| 210 | exclude = False |
| 211 | for name in exclude_names: |
| 212 | if name in filename: |
| 213 | exclude = True |
| 214 | break |
| 215 | if not exclude: |
| 216 | ret.append(source_file) |
| 217 | return ret |
| 218 | |
| 219 | |
| 220 | def smart_compile(compiler, macros, extra_args, sources, output_dir): |
no outgoing calls
no test coverage detected