Lines Matching +full:0 +full:- +full:all +full:- +full:deps
2 # Copyright 2016 Google Inc. All Rights Reserved.
8 # http://www.apache.org/licenses/LICENSE-2.0
11 # distributed under the License is distributed on an "AS-IS" BASIS,
32 num_used_ids = 0
33 is_toplevel = [True for i in range(0, num_components_with_no_deps + num_components_with_deps)]
35 for i in range(0, num_components_with_no_deps):
40 # Then the rest have num_deps deps, chosen (pseudo-)randomly from the previous components.
41 …# The last few components depend more components with >1 deps, so that the last component transiti…
43 for i in range(0, num_components_with_deps):
44 deps = set()
46 if len(toplevel_components) > (num_components_with_deps - 1 - i) * (num_deps - 1):
47 # We need at least 1 dep with deps, otherwise the last few components will not be enough
48 # to tie together all components.
49 …num_deps_with_deps = len(toplevel_components) - (num_components_with_deps - 1 - i) * (num_deps - 1)
50 deps |= set(random.sample(toplevel_components, num_deps_with_deps))
52 # Add other deps to get to the desired num_deps.
53 deps |= set(random.sample(range(0, num_components_with_no_deps + i), num_deps - len(deps)))
55 toplevel_components -= deps
56 for dep in deps:
62 deps_list = list(deps)
68 toplevel_component = num_used_ids - 1
98 …"Too few components with no deps. num_components_with_no_deps=%s but num_deps=%s." % (num_componen…
127 include_flags = ' '.join(['-I%s' % include_dir for include_dir in include_dirs])
128 library_dirs_flags = ' '.join(['-L%s' % library_dir for library_dir in library_dirs])
129 rpath_flags = ' '.join(['-Wl,-rpath,%s' % library_dir for library_dir in library_dirs])
130 link_libraries_flags = ' '.join(['-l%s' % library for library in link_libraries])
133 other_compile_flags.append('-g')
135 other_compile_flags.append('-fno-exceptions')
137 other_compile_flags.append('-fno-rtti')
138 …compile_command = '%s -std=%s -MMD -MP -O2 -W -Wall -DNDEBUG -ftemplate-depth=10000 %s %s' % (comp…
139 …link_command = '%s -std=%s -O2 -W -Wall %s %s' % (compiler, cxx_std, rpath_flags, library_dirs_fla…
140 # GCC requires passing the -lfruit flag *after* all object files to be linked for some reason.
158 …parser.add_argument('--di-library', default='fruit', help='DI library to use. One of {fruit, boost…
159 parser.add_argument('--compiler', help='Compiler to use')
160 …parser.add_argument('--fruit-sources-dir', help='Path to the fruit sources (only used when di_libr…
161 …parser.add_argument('--fruit-build-dir', help='Path to the fruit build dir (only used with --di_li…
162 …parser.add_argument('--boost-di-sources-dir', help='Path to the Boost.DI sources (only used with -…
163 …parser.add_argument('--num-components-with-no-deps', default=10, help='Number of components with n…
164 …parser.add_argument('--num-components-with-deps', default=90, help='Number of components with deps…
165 …parser.add_argument('--num-deps', default=10, help='Number of deps in each component with deps tha…
166 parser.add_argument('--output-dir', help='Output directory for generated files')
167 parser.add_argument('--cxx-std', default='c++11',
169 …parser.add_argument('--use-new-delete', default='false', help='Set this to \'true\' to use new/del…
170 …parser.add_argument('--use-interfaces', default='false', help='Set this to \'true\' to use interfa…
171 …--use-normalized-component', default='false', help='Set this to \'true\' to create a NormalizedCom…
172 …parser.add_argument('--generate-runtime-bench-code', default='true', help='Set this to \'false\' f…
173 …parser.add_argument('--generate-debuginfo', default='false', help='Set this to \'true\' to generat…
174 …parser.add_argument('--use-exceptions', default='true', help='Set this to \'false\' to disable exc…
175 parser.add_argument('--use-rtti', default='true', help='Set this to \'false\' to disable RTTI.')
180 raise Exception('--compiler is required.')
184 raise Exception('--fruit-sources-dir is required with --di-library=\'fruit\'.')
186 raise Exception('--fruit-build-dir is required with --di-library=\'fruit\'.')
189 raise Exception('--boost-di-sources-dir is required with --di-library=\'boost_di\'.')
193 …raise Exception('Unrecognized --di-library: \'%s\'. Allowed values are %s' % (args.di_library, {'f…