MCPcopy Create free account
hub / github.com/cztomczak/cefpython / get_sources

Function get_sources

tools/build_cpp_projects.py:191–217  ·  view source on GitHub ↗
(sources_dir, exclude_names=None)

Source from the content-addressed store, hash-verified

189
190
191def 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
220def smart_compile(compiler, macros, extra_args, sources, output_dir):

Callers 3

build_libraryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected