Lines Matching refs:target
113 target = stmt.children[1].children[0].strip('\"')
114 if target not in self.filtered_targets:
116 self.current_target = target
117 self._Target(target_type, target, stmt.children[2].children)
119 def _Target(self, target_type, target, stmts):
121 return self.builder.BuildTarget(target_type, target, stmts)
316 self._GenTargetString(target, sets)
317 for target, sets in self.source_sets.items())
320 def BuildTarget(self, target_type, target, rules):
324 # {self._CMakeTarget(target)} sources.
329 TARGETS[target], []).append('${' + self._SourceVar(target) + '}')
331 def BuildSourcesList(self, target, sources):
332 sources = self._ExpandSources(target, sources)
333 return f'set({self._SourceVar(target)} {sources})'
335 def BuildAppendSources(self, target, sources):
336 sources = self._ExpandSources(target, sources)
337 return f'list(APPEND {self._SourceVar(target)} {sources})'
339 def BuildRemoveSources(self, target, sources):
340 sources = self._ExpandSources(target, sources)
341 return f'list(REMOVE_ITEM {self._SourceVar(target)} {sources})'
421 target = CMAKE_TARGETS[target_type]
423 # {target.desc} target.
424 {target.cmake}({target.name} {' '.join(source_sets)})
426 {'target_link_libraries(' + target.name + ' ' + ' '.join(target.deps) + ')' if target.deps else ''}
428 target_include_directories({target.name} PRIVATE "${{CMAKE_SOURCE_DIR}}"
432 target_compile_definitions({target.name} PRIVATE "-DCPPGC_SUPPORTS_OBJECT_NAMES")
435 target_compile_definitions({target.name} PRIVATE "-DCPPGC_CAGED_HEAP")
438 target_compile_definitions({target.name} PRIVATE "-DCPPGC_ENABLE_VERIFY_HEAP")
441 target_compile_definitions({target.name} PRIVATE "-DCPPGC_YOUNG_GENERATION")
445 def _ExpandSources(target, sources):
446 if TARGETS[target] == 'tests':
451 def _SourceVar(target):
452 return CMakeBuilder._CMakeVar(target) + '_SOURCES'