@@ -142,37 +142,44 @@ def __init__(self, reference, os_name, gcc_versions, apple_clang_versions, clang
142142 options = []
143143 self ._options = transform_list_options_to_dict (options )
144144
145- def get_builds (self , pure_c , shared_option_name , dll_with_static_runtime , reference = None ):
145+ def get_builds (self , pure_c , shared_option_name , dll_with_static_runtime , reference = None ,
146+ build_all_options_values = None ):
146147
147148 ref = reference or self ._reference
148149
149150 if self ._os_name == "Windows" :
150151 if self ._mingw_configurations :
151152 builds = get_mingw_builds (self ._mingw_configurations ,
152153 get_mingw_package_reference (), self ._archs ,
153- shared_option_name , self ._build_types , self ._cppstds , self ._options , ref )
154+ shared_option_name , self ._build_types , self ._cppstds ,
155+ self ._options , ref , build_all_options_values )
154156 else :
155157 builds = []
156158 builds .extend (get_visual_builds (self ._visual_versions , self ._archs ,
157159 self ._visual_runtimes , self ._visual_toolsets ,
158160 shared_option_name , dll_with_static_runtime ,
159161 self ._vs10_x86_64_enabled ,
160- self ._build_types , self ._cppstds , self ._options , ref ))
162+ self ._build_types , self ._cppstds , self ._options , ref ,
163+ build_all_options_values ))
161164 return builds
162165 elif self ._os_name == "Linux" :
163166 builds = get_linux_gcc_builds (self ._gcc_versions , self ._archs , shared_option_name ,
164- pure_c , self ._build_types , self ._cppstds , self ._options , ref )
167+ pure_c , self ._build_types , self ._cppstds , self ._options , ref ,
168+ build_all_options_values )
165169 builds .extend (get_linux_clang_builds (self ._clang_versions , self ._archs ,
166170 shared_option_name , pure_c , self ._build_types ,
167- self ._cppstds , self ._options , ref ))
171+ self ._cppstds , self ._options , ref ,
172+ build_all_options_values ))
168173 return builds
169174 elif self ._os_name == "Darwin" :
170175 return get_osx_apple_clang_builds (self ._apple_clang_versions , self ._archs ,
171176 shared_option_name , pure_c , self ._build_types ,
172- self ._cppstds , self ._options , ref )
177+ self ._cppstds , self ._options , ref ,
178+ build_all_options_values )
173179 elif self ._os_name == "FreeBSD" :
174180 return get_linux_clang_builds (self ._clang_versions , self ._archs , shared_option_name ,
175- pure_c , self ._build_types , self ._cppstds , self ._options , ref )
181+ pure_c , self ._build_types , self ._cppstds , self ._options ,
182+ ref , build_all_options_values )
176183 else :
177184 raise Exception ("Unknown operating system: %s" % self ._os_name )
178185
@@ -195,13 +202,13 @@ def __new__(cls, settings, options, env_vars, build_requires, reference):
195202 if isinstance (reference , str ):
196203 reference = ConanFileReference .loads (reference )
197204
198- return super (BuildConf , cls ).__new__ (cls , settings , options , env_vars ,
199- build_requires , reference )
205+ return super (BuildConf , cls ).__new__ (cls , settings , options , env_vars , build_requires ,
206+ reference )
200207
201208
202209def get_mingw_builds (mingw_configurations , mingw_installer_reference ,
203210 archs , shared_option_name , build_types , cppstds ,
204- options , reference = None ):
211+ options , reference = None , build_all_options_values = None ):
205212 builds = []
206213 for config in mingw_configurations :
207214 version , arch , exception , thread = config
@@ -213,11 +220,16 @@ def get_mingw_builds(mingw_configurations, mingw_installer_reference,
213220 "compiler.exception" : exception }
214221 build_requires = {"*" : [mingw_installer_reference ]}
215222
216- if shared_option_name :
223+ if shared_option_name and not build_all_options_values :
217224 for shared in [True , False ]:
218225 opt = copy .copy (options )
219226 opt [shared_option_name ] = shared
220227 builds += _make_mingw_builds (settings , opt , build_requires , build_types , cppstds , reference )
228+ elif build_all_options_values :
229+ for option_values in build_all_options_values :
230+ opt = copy .copy (options )
231+ opt .update (option_values )
232+ builds += _make_mingw_builds (settings , opt , build_requires , build_types , cppstds , reference )
221233 else :
222234 builds += _make_mingw_builds (settings , copy .copy (options ), build_requires , build_types , cppstds , reference )
223235
@@ -241,7 +253,7 @@ def _make_mingw_builds(settings, options, build_requires, build_types, cppstds,
241253
242254def get_visual_builds (visual_versions , archs , visual_runtimes , visual_toolsets , shared_option_name ,
243255 dll_with_static_runtime , vs10_x86_64_enabled , build_types , cppstds ,
244- options , reference = None ):
256+ options , reference = None , build_all_options_values = None ):
245257
246258 visual_toolsets = visual_toolsets or get_env_visual_toolsets ()
247259 ret = []
@@ -258,14 +270,16 @@ def get_visual_builds(visual_versions, archs, visual_runtimes, visual_toolsets,
258270 visual_builds = get_visual_builds_for_version (visual_runtimes , visual_version , arch ,
259271 shared_option_name ,
260272 dll_with_static_runtime , build_types ,
261- cppstds , options , reference , toolset = toolset )
273+ cppstds , options , reference ,
274+ toolset = toolset ,
275+ build_all_options_values = build_all_options_values )
262276 ret .extend (visual_builds )
263277 return ret
264278
265279
266280def get_visual_builds_for_version (visual_runtimes , visual_version , arch , shared_option_name ,
267281 dll_with_static_runtime , build_types , cppstds , options ,
268- reference = None , toolset = None ):
282+ reference = None , toolset = None , build_all_options_values = None ):
269283 base_set = {"compiler" : "Visual Studio" ,
270284 "compiler.version" : visual_version ,
271285 "arch" : arch }
@@ -294,7 +308,7 @@ def get_visual_builds_for_version(visual_runtimes, visual_version, arch, shared_
294308 partial_settings = {"build_type" : bld , "compiler.runtime" : rt }
295309 if cppstd :
296310 partial_settings ["compiler.cppstd" ] = cppstd
297- if shared_option_name :
311+ if shared_option_name and not build_all_options_values :
298312 opt = copy .copy (options )
299313 opt [shared_option_name ] = False
300314 sets .append ((partial_settings , opt , {}, {}))
@@ -309,6 +323,15 @@ def get_visual_builds_for_version(visual_runtimes, visual_version, arch, shared_
309323 opt [shared_option_name ] = True
310324 sets .append ((partial_settings ,
311325 opt , {}, {}))
326+ elif build_all_options_values :
327+ for option_values in build_all_options_values :
328+ opt = copy .copy (options )
329+ opt .update (option_values )
330+ sets .append ((partial_settings , opt , {}, {}))
331+ if shared_option_name and rt in ['MT' , 'MTd' ] and dll_with_static_runtime :
332+ new_opt = copy .copy (opt )
333+ new_opt [shared_option_name ] = True
334+ sets .append ((partial_settings , opt , {}, {}))
312335 else :
313336 sets .append ((partial_settings , options , {}, {}))
314337
@@ -336,13 +359,14 @@ def get_build(compiler, the_arch, the_build_type, the_compiler_version,
336359
337360
338361def get_osx_apple_clang_builds (apple_clang_versions , archs , shared_option_name ,
339- pure_c , build_types , cppstds , options , reference = None ):
362+ pure_c , build_types , cppstds , options , reference = None ,
363+ build_all_options_values = None ):
340364 ret = []
341365 # Not specified compiler or compiler version, will use the auto detected
342366 for compiler_version in apple_clang_versions :
343367 for arch in archs :
344368 for cppstd in cppstds :
345- if shared_option_name :
369+ if shared_option_name and not build_all_options_values :
346370 for shared in [True , False ]:
347371 opt = copy .copy (options )
348372 opt [shared_option_name ] = shared
@@ -355,6 +379,19 @@ def get_osx_apple_clang_builds(apple_clang_versions, archs, shared_option_name,
355379 ret .append (get_build ("apple-clang" , arch , build_type_it ,
356380 compiler_version , None ,
357381 None , opt , reference ))
382+ elif build_all_options_values :
383+ for option_values in build_all_options_values :
384+ opt = copy .copy (options )
385+ opt .update (option_values )
386+ for build_type_it in build_types :
387+ if not pure_c :
388+ ret .append (get_build ("apple-clang" , arch , build_type_it ,
389+ compiler_version , cppstd ,
390+ "libc++" , opt , reference ))
391+ else :
392+ ret .append (get_build ("apple-clang" , arch , build_type_it ,
393+ compiler_version , None ,
394+ None , opt , reference ))
358395 else :
359396 for build_type_it in build_types :
360397 if not pure_c :
@@ -370,13 +407,13 @@ def get_osx_apple_clang_builds(apple_clang_versions, archs, shared_option_name,
370407
371408
372409def get_linux_gcc_builds (gcc_versions , archs , shared_option_name , pure_c , build_types , cppstds ,
373- options , reference = None ):
410+ options , reference = None , build_all_options_values = None ):
374411 ret = []
375412 # Not specified compiler or compiler version, will use the auto detected
376413 for gcc_version in gcc_versions :
377414 for arch in archs :
378415 for cppstd in cppstds :
379- if shared_option_name :
416+ if shared_option_name and not build_all_options_values :
380417 for shared in [True , False ]:
381418 opt = copy .copy (options )
382419 opt [shared_option_name ] = shared
@@ -390,6 +427,21 @@ def get_linux_gcc_builds(gcc_versions, archs, shared_option_name, pure_c, build_
390427 else :
391428 ret .append (get_build ("gcc" , arch , build_type_it , gcc_version ,
392429 None , None , opt , reference ))
430+ elif build_all_options_values :
431+ for option_values in build_all_options_values :
432+ opt = copy .copy (options )
433+ opt .update (option_values )
434+ for build_type_it in build_types :
435+ if not pure_c :
436+ ret .append (get_build ("gcc" , arch , build_type_it , gcc_version ,
437+ cppstd , "libstdc++" , opt , reference ))
438+ if float (gcc_version ) >= 5 :
439+ ret .append (get_build ("gcc" , arch , build_type_it , gcc_version ,
440+ cppstd , "libstdc++11" , opt , reference ))
441+ else :
442+ ret .append (get_build ("gcc" , arch , build_type_it , gcc_version ,
443+ None , None , opt , reference ))
444+
393445 else :
394446 for build_type_it in build_types :
395447 if not pure_c :
@@ -405,13 +457,13 @@ def get_linux_gcc_builds(gcc_versions, archs, shared_option_name, pure_c, build_
405457
406458
407459def get_linux_clang_builds (clang_versions , archs , shared_option_name , pure_c , build_types , cppstds ,
408- options , reference = None ):
460+ options , reference = None , build_all_options_values = None ):
409461 ret = []
410462 # Not specified compiler or compiler version, will use the auto detected
411463 for clang_version in clang_versions :
412464 for arch in archs :
413465 for cppstd in cppstds :
414- if shared_option_name :
466+ if shared_option_name and not build_all_options_values :
415467 for shared in [True , False ]:
416468 opt = copy .copy (options )
417469 opt [shared_option_name ] = shared
@@ -424,6 +476,19 @@ def get_linux_clang_builds(clang_versions, archs, shared_option_name, pure_c, bu
424476 else :
425477 ret .append (get_build ("clang" , arch , build_type_it , clang_version ,
426478 None , None , opt , reference ))
479+ elif build_all_options_values :
480+ for option_values in build_all_options_values :
481+ opt = copy .copy (options )
482+ opt .update (option_values )
483+ for build_type_it in build_types :
484+ if not pure_c :
485+ ret .append (get_build ("clang" , arch , build_type_it , clang_version ,
486+ cppstd , "libstdc++" , opt , reference ))
487+ ret .append (get_build ("clang" , arch , build_type_it , clang_version ,
488+ cppstd , "libc++" , opt , reference ))
489+ else :
490+ ret .append (get_build ("clang" , arch , build_type_it , clang_version ,
491+ None , None , opt , reference ))
427492 else :
428493 for build_type_it in build_types :
429494 if not pure_c :
0 commit comments