boostcpp.jam 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. # Boost.Build support specific for the Boost C++ Libraries.
  2. # Copyright Vladimir Prus 2002-2010.
  3. # Copyright Dave Abrahams 2005-2006.
  4. # Copyright Rene Rivera 2005-2007.
  5. # Copyright Douglas Gregor 2005.
  6. #
  7. # Distributed under the Boost Software License, Version 1.0.
  8. # (See accompanying file LICENSE_1_0.txt or copy at
  9. # http://www.boost.org/LICENSE_1_0.txt)
  10. import "class" : new ;
  11. import common ;
  12. import configure ;
  13. import build-system ;
  14. import generate ;
  15. import modules ;
  16. import option ;
  17. import os ;
  18. import package ;
  19. import path ;
  20. import project ;
  21. import regex ;
  22. import sequence ;
  23. import set ;
  24. import targets ;
  25. import feature ;
  26. import property ;
  27. import version : version-less ;
  28. ##############################################################################
  29. #
  30. # 0. General setup. Parse options, check them.
  31. #
  32. ##############################################################################
  33. BOOST_ROOT = [ modules.binding $(__name__) ] ;
  34. BOOST_ROOT = $(BOOST_ROOT:D) ;
  35. rule set-version ( version )
  36. {
  37. BOOST_VERSION = $(version) ;
  38. local version-tag =
  39. [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(BOOST_VERSION) ] ;
  40. if $(version-tag[3]) = 0
  41. {
  42. version-tag = $(version-tag[1-2]) ;
  43. }
  44. BOOST_VERSION_TAG = $(version-tag:J=_) ;
  45. }
  46. # Option to choose how many variants to build. The default is "minimal".
  47. build-type = [ option.get build-type ] ;
  48. build-type ?= minimal ;
  49. if ! ( $(build-type) in complete minimal )
  50. {
  51. EXIT The value of the --build-type option should be either 'complete' or
  52. 'minimal' ;
  53. }
  54. # What kind of layout are we doing?
  55. layout = [ option.get layout : "" ] ;
  56. layout = [ MATCH (versioned|tagged|system)(-(.+))? : $(layout) ] ;
  57. if $(layout[3])
  58. {
  59. layout-version = $(layout[3]) ;
  60. layout = $(layout[1]) ;
  61. if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 66 ]
  62. {
  63. layout-version = 1.40 ;
  64. }
  65. else if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 69 ]
  66. {
  67. layout-version = 1.66 ;
  68. }
  69. }
  70. layout-version ?= 1.69 ;
  71. # On Windows, we used versioned layout by default in order to be compatible with
  72. # autolink. On other systems, we use system layout which is what every other
  73. # program uses. Note that the Windows check is static, and will not be affected
  74. # by specific build properties used.
  75. if ! $(layout)
  76. {
  77. if [ os.name ] = NT
  78. {
  79. layout = versioned ;
  80. }
  81. else
  82. {
  83. layout = system ;
  84. }
  85. }
  86. layout-$(layout) = true ;
  87. if $(layout) = system && $(build-type) = complete
  88. {
  89. ECHO error\: Cannot use --layout=system with --build-type complete. ;
  90. ECHO error\: Please use either --layout=versioned or --layout=tagged ;
  91. ECHO error\: if you wish to build multiple variants. ;
  92. if [ os.name ] != NT
  93. {
  94. ECHO error\: Note that --layout=system is used by default on Unix
  95. starting with Boost 1.40. ;
  96. }
  97. EXIT ;
  98. }
  99. # Possible stage only location.
  100. stage-locate = [ option.get stagedir ] ;
  101. stage-locate ?= stage ;
  102. BOOST_STAGE_LOCATE = $(stage-locate) ;
  103. # Custom build ID.
  104. build-id = [ option.get buildid ] ;
  105. if $(build-id)
  106. {
  107. BUILD_ID = [ regex.replace $(build-id) "[*\\/:.\"\' ]" _ ] ;
  108. }
  109. # Python build id (for Python libraries only).
  110. python-id = [ option.get "python-buildid" ] ;
  111. if $(python-id)
  112. {
  113. PYTHON_ID = [ regex.replace $(python-id) "[*\\/:.\"\']" _ ] ;
  114. }
  115. if $(layout) = versioned
  116. {
  117. switch $(layout-version)
  118. {
  119. case 1.40 :
  120. .format-name-args =
  121. <base> <toolset> <threading> <runtime> ;
  122. case 1.66 :
  123. .format-name-args =
  124. <base> <toolset> <threading> <runtime> <arch-and-model> ;
  125. case 1.69 :
  126. .format-name-args =
  127. <base> <toolset> <threading> <runtime> <arch-and-model> ;
  128. }
  129. }
  130. else if $(layout) = tagged
  131. {
  132. switch $(layout-version)
  133. {
  134. case 1.40 :
  135. .format-name-args =
  136. <base> <threading> <runtime> ;
  137. case 1.66 :
  138. .format-name-args =
  139. <base> <threading> <runtime> ;
  140. case 1.69 :
  141. .format-name-args =
  142. <base> <threading> <runtime> <arch-and-model> ;
  143. }
  144. }
  145. else if $(layout) = system
  146. {
  147. .format-name-args = <base> ;
  148. }
  149. else
  150. {
  151. .format-name-error = true ;
  152. }
  153. ################################################################################
  154. #
  155. # 1. 'tag' function adding decorations suitable to the properties if versioned
  156. # or tagged layout is requested. Called from Jamroot.
  157. #
  158. ################################################################################
  159. rule tag ( name : type ? : property-set )
  160. {
  161. if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
  162. {
  163. local args = $(.format-name-args) ;
  164. if $(layout) = versioned
  165. {
  166. args += -$(BOOST_VERSION_TAG) ;
  167. }
  168. local result = [ common.format-name
  169. $(args) -$(BUILD_ID)
  170. : $(name) : $(type) : $(property-set) ] ;
  171. if $(.format-name-error)
  172. {
  173. EXIT error\: invalid layout '$(layout:E=)' ;
  174. }
  175. # Optionally add version suffix. On NT, library with version suffix will
  176. # not be recognized by linkers. On CYGWIN, we get strage duplicate
  177. # symbol errors when library is generated with version suffix. On OSX,
  178. # version suffix is not needed -- the linker expects the
  179. # libFoo.1.2.3.dylib format. AIX linkers do not accept version suffixes
  180. # either. Pgi compilers can not accept a library with version suffix.
  181. if $(type) = SHARED_LIB &&
  182. ! [ $(property-set).get <target-os> ] in windows cygwin darwin aix &&
  183. ! [ $(property-set).get <toolset> ] in pgi
  184. {
  185. result = $(result).$(BOOST_VERSION) ;
  186. }
  187. return $(result) ;
  188. }
  189. }
  190. # Specialized tag function to use for libraries linking to Python.
  191. # Appends value of --python-buildid if provided.
  192. rule python-tag ( name : type ? : property-set )
  193. {
  194. local result = $(name) ;
  195. if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB && $(PYTHON_ID)
  196. {
  197. result = $(result)-$(PYTHON_ID) ;
  198. }
  199. # forward to the boost tagging rule
  200. return [ tag $(result) : $(type) : $(property-set) ] ;
  201. }
  202. ################################################################################
  203. #
  204. # 2. Declare targets that build and install all libraries. Specifically:
  205. #
  206. # - 'stage-proper' that puts all libraries in stage/lib
  207. # - 'install-proper' that install libraries and headers to system location
  208. #
  209. ################################################################################
  210. rule filtered-target ( name : message + : sources + : requirements * )
  211. {
  212. message $(name)-message : warning\: $(message) ;
  213. alias $(name) : $(sources) : $(requirements) ;
  214. alias $(name) : $(name)-message ;
  215. local p = [ project.current ] ;
  216. $(p).mark-target-as-explicit $(name) ;
  217. $(p).mark-target-as-explicit $(name)-message ;
  218. }
  219. rule declare_install_and_stage_proper_targets ( libraries * : headers * : modular-headers * )
  220. {
  221. local p = [ project.current ] ;
  222. for local l in $(libraries)
  223. {
  224. if $(l) = locale
  225. {
  226. filtered-target $(l)-for-install :
  227. Skipping Boost.Locale library with threading=single. :
  228. libs/$(l)/build : <threading>multi ;
  229. }
  230. else if $(l) = wave
  231. {
  232. filtered-target $(l)-for-install :
  233. Skipping Boost.Wave library with threading=single. :
  234. libs/$(l)/build : <threading>multi ;
  235. }
  236. else if $(l) = thread
  237. {
  238. filtered-target $(l)-for-install :
  239. Skipping Boost.Thread library with threading=single. :
  240. libs/$(l)/build : <threading>multi ;
  241. }
  242. else
  243. {
  244. alias $(l)-for-install : libs/$(l)/build ;
  245. $(p).mark-target-as-explicit $(l)-for-install ;
  246. }
  247. }
  248. local library-targets = $(libraries)-for-install ;
  249. local install-requirements ;
  250. if $(layout-versioned)
  251. {
  252. install-requirements +=
  253. <install-header-subdir>boost-$(BOOST_VERSION_TAG)/boost ;
  254. }
  255. else
  256. {
  257. install-requirements += <install-header-subdir>boost ;
  258. }
  259. if [ os.name ] = NT
  260. {
  261. install-requirements += <install-default-prefix>C:/Boost ;
  262. }
  263. else
  264. {
  265. install-requirements += <install-default-prefix>/usr/local ;
  266. }
  267. p = [ project.current ] ;
  268. # These headers will be installed from the modular
  269. # layout, and should be ignored in the global boost/
  270. local skip-headers ;
  271. # Install modular headers.
  272. for local lib in $(modular-headers)
  273. {
  274. local header-root = $(BOOST_ROOT)/libs/$(lib)/include/boost ;
  275. local lib-headers =
  276. [ path.glob-tree $(header-root) : *.hpp *.ipp *.h *.inc *.SUNWCCh : CVS .svn ]
  277. [ path.glob-tree $(header-root)/compatibility/cpp_c_headers : c* : CVS .svn ]
  278. [ path.glob $(header-root)/tr1/tr1 : * : bcc32 sun CVS .svn ]
  279. ;
  280. skip-headers += [ sequence.transform path.relative-to [ path.make $(header-root) ] : $(lib-headers) ] ;
  281. package.install install-$(lib)-headers
  282. : <install-source-root>$(header-root)
  283. $(install-requirements)
  284. <install-no-version-symlinks>on
  285. : # binaries
  286. : # libraries
  287. : $(lib-headers)
  288. ;
  289. $(p).mark-target-as-explicit install-$(lib)-headers ;
  290. }
  291. # Filter out headers that were created by b2 headers
  292. local header-root = [ path.make $(BOOST_ROOT)/boost ] ;
  293. headers = [ set.difference $(headers) : $(header-root)/$(skip-headers) ] ;
  294. # Complete install.
  295. package.install install-proper
  296. : <install-source-root>$(BOOST_ROOT)/boost
  297. $(install-requirements)
  298. <install-no-version-symlinks>on
  299. :
  300. : $(libraries)-for-install
  301. : $(headers)
  302. ;
  303. $(p).mark-target-as-explicit install-proper ;
  304. # Install just library.
  305. install stage-proper
  306. : $(libraries)-for-install
  307. : <location>$(stage-locate)/lib
  308. <install-dependencies>on <install-type>LIB
  309. <install-no-version-symlinks>on
  310. ;
  311. $(p).mark-target-as-explicit stage-proper ;
  312. }
  313. ################################################################################
  314. #
  315. # 3. Declare top-level targets 'stage' and 'install'. These examine the
  316. # --build-type option and, in case it is 'complete', build the 'install-proper'
  317. # and 'stage-proper' targets with a number of property sets.
  318. #
  319. ################################################################################
  320. class top-level-target : alias-target-class
  321. {
  322. import modules ;
  323. rule __init__ ( name : project : sources * : requirements *
  324. : default-build * : usage-requirements * )
  325. {
  326. alias-target-class.__init__ $(name) : $(project) : $(sources) :
  327. $(requirements) : $(default-build) : $(usage-requirements) ;
  328. self.build-type = [ modules.peek boostcpp : build-type ] ;
  329. # On Linux, we build the release variant by default, since few users
  330. # will ever want to debug C++ Boost libraries, and there is no ABI
  331. # incompatibility between debug and release variants. We build shared
  332. # and static libraries since that is what most packages seem to provide
  333. # (.so in libfoo and .a in libfoo-dev).
  334. self.minimal-properties = [ property-set.create <variant>release
  335. <threading>multi <link>shared <link>static <runtime-link>shared ] ;
  336. # On Windows, new IDE projects use:
  337. #
  338. # runtime-link=dynamic, threading=multi, variant=(debug|release)
  339. #
  340. # and in addition, C++ Boost's autolink defaults to static linking.
  341. self.minimal-properties-win = [ property-set.create <variant>debug
  342. <variant>release <threading>multi <link>static <runtime-link>shared
  343. <address-model>32 <address-model>64 ] ;
  344. self.complete-properties = [ property-set.create
  345. <variant>debug <variant>release
  346. <threading>multi
  347. <link>shared <link>static
  348. <runtime-link>shared <runtime-link>static ] ;
  349. self.complete-properties-win = [ property-set.create
  350. <variant>debug <variant>release
  351. <threading>multi
  352. <link>shared <link>static
  353. <runtime-link>shared <runtime-link>static
  354. <address-model>32 <address-model>64 ] ;
  355. }
  356. rule generate ( property-set )
  357. {
  358. modules.poke : top-level-targets : [ modules.peek : top-level-targets ]
  359. $(self.name) ;
  360. local os = [ $(property-set).get <target-os> ] ;
  361. # Because we completely override the parent's 'generate' we need to
  362. # check for default feature values ourselves.
  363. if ! $(os)
  364. {
  365. os = [ feature.defaults <target-os> ] ;
  366. os = $(os:G=) ;
  367. }
  368. local build-type-set ;
  369. if $(self.build-type) = minimal
  370. {
  371. if $(os) = windows
  372. {
  373. build-type-set = $(self.minimal-properties-win) ;
  374. }
  375. else
  376. {
  377. build-type-set = $(self.minimal-properties) ;
  378. }
  379. }
  380. else if $(self.build-type) = complete
  381. {
  382. if $(os) = windows
  383. {
  384. build-type-set = $(self.complete-properties-win) ;
  385. }
  386. else
  387. {
  388. build-type-set = $(self.complete-properties) ;
  389. }
  390. }
  391. else
  392. {
  393. import errors ;
  394. errors.error "Unknown build type" ;
  395. }
  396. if $(build-type-set)
  397. {
  398. local expanded = [ targets.apply-default-build $(property-set)
  399. : $(build-type-set) ] ;
  400. # Filter inappopriate combinations.
  401. local filtered ;
  402. for local p in $(expanded)
  403. {
  404. # See comment in handle-static-runtime regarding this logic.
  405. if [ $(p).get <link> ] = shared
  406. && [ $(p).get <runtime-link> ] = static
  407. && [ $(p).get <toolset> ] != cw
  408. {
  409. # Skip this.
  410. }
  411. else
  412. {
  413. filtered += $(p) ;
  414. }
  415. }
  416. return [ build-multiple $(filtered) ] ;
  417. }
  418. }
  419. rule build-multiple ( property-sets * )
  420. {
  421. local usage-requirements = [ property-set.empty ] ;
  422. local result ;
  423. for local p in $(property-sets)
  424. {
  425. local r = [ alias-target-class.generate $(p) ] ;
  426. if $(r)
  427. {
  428. usage-requirements = [ $(usage-requirements).add $(r[1]) ] ;
  429. result += $(r[2-]) ;
  430. }
  431. }
  432. return $(usage-requirements) [ sequence.unique $(result) ] ;
  433. }
  434. }
  435. rule declare_top_level_targets ( libraries * : headers * : modular-headers * )
  436. {
  437. declare_install_and_stage_proper_targets $(libraries) : $(headers) : $(modular-headers) ;
  438. targets.create-metatarget top-level-target : [ project.current ]
  439. : install
  440. : install-$(modular-headers)-headers install-proper
  441. ;
  442. targets.create-metatarget top-level-target : [ project.current ]
  443. : stage
  444. : stage-proper headers
  445. ;
  446. p = [ project.current ] ;
  447. $(p).mark-target-as-explicit install stage ;
  448. # This target is built by default, and will forward to 'stage' after
  449. # producing some explanations.
  450. targets.create-metatarget top-level-target : [ project.current ]
  451. : forward
  452. : explain stage
  453. ;
  454. }
  455. stage-abs = [ path.native [ path.root $(stage-locate)/lib [ path.pwd ] ] ] ;
  456. ################################################################################
  457. #
  458. # 4. Add hook to report configuration before the build, and confirmation with
  459. # setup instructions after the build.
  460. #
  461. ################################################################################
  462. message explain : "\nBuilding the Boost C++ Libraries.\n\n" ;
  463. local p = [ project.current ] ;
  464. $(p).mark-target-as-explicit explain ;
  465. rule pre-build ( )
  466. {
  467. local tl = [ modules.peek : top-level-targets ] ;
  468. if stage in $(tl) || install in $(tl)
  469. {
  470. # FIXME: Remove 'if' when Boost regression tests start using trunk bjam.
  471. if PAD in [ RULENAMES ]
  472. {
  473. configure.print-component-configuration ;
  474. }
  475. }
  476. }
  477. IMPORT $(__name__) : pre-build : : $(__name__).pre-build ;
  478. build-system.set-pre-build-hook $(__name__).pre-build ;
  479. # FIXME: Revise stage_abs.
  480. rule post-build ( ok ? )
  481. {
  482. if forward in [ modules.peek : top-level-targets ]
  483. {
  484. if $(ok)
  485. {
  486. local include-path = [ path.native $(BOOST_ROOT) ] ;
  487. ECHO "
  488. The Boost C++ Libraries were successfully built!
  489. The following directory should be added to compiler include paths:
  490. $(include-path)
  491. The following directory should be added to linker library paths:
  492. $(stage-abs)
  493. " ;
  494. }
  495. }
  496. }
  497. IMPORT $(__name__) : post-build : : $(__name__).post-build ;
  498. build-system.set-post-build-hook $(__name__).post-build ;
  499. ################################################################################
  500. #
  501. # 5. Top-level setup.
  502. #
  503. ################################################################################
  504. # Decides which libraries are to be installed by looking at --with-<library>
  505. # --without-<library> arguments. Returns the list of directories under "libs"
  506. # which must be built and installed.
  507. #
  508. rule libraries-to-install ( existing-libs * )
  509. {
  510. local argv = [ modules.peek : ARGV ] ;
  511. local with-parameter = [ MATCH ^--with-(.*) : $(argv) ] ;
  512. local without-parameter = [ MATCH ^--without-(.*) : $(argv) ] ;
  513. if ! $(with-parameter) && ! $(without-parameter)
  514. {
  515. # Nothing is specified on command line. See if maybe project-config.jam
  516. # has some choices.
  517. local libs = [ modules.peek project-config : libraries ] ;
  518. with-parameter = [ MATCH ^--with-(.*) : $(libs) ] ;
  519. without-parameter = [ MATCH ^--without-(.*) : $(libs) ] ;
  520. }
  521. # Do some checks.
  522. if $(with-parameter) && $(without-parameter)
  523. {
  524. EXIT error\: both --with-<library> and --without-<library> specified ;
  525. }
  526. local wrong = [ set.difference $(with-parameter) : $(existing-libs) ] ;
  527. if $(wrong)
  528. {
  529. EXIT error\: wrong library name '$(wrong[1])' in the --with-<library>
  530. option. ;
  531. }
  532. local wrong = [ set.difference $(without-parameter) : $(existing-libs) ] ;
  533. if $(wrong)
  534. {
  535. EXIT error\: wrong library name '$(wrong[1])' in the --without-<library>
  536. option. ;
  537. }
  538. if $(with-parameter)
  539. {
  540. return [ set.intersection $(existing-libs) : $(with-parameter) ] ;
  541. }
  542. else
  543. {
  544. return [ set.difference $(existing-libs) : $(without-parameter) ] ;
  545. }
  546. }
  547. rule declare-targets ( all-libraries * : headers * : modular-headers * )
  548. {
  549. configure.register-components $(all-libraries) ;
  550. # Select the libraries to install.
  551. libraries = [ libraries-to-install $(all-libraries) ] ;
  552. configure.components-building $(libraries) ;
  553. if [ option.get "show-libraries" : : true ]
  554. {
  555. ECHO The following libraries require building\: ;
  556. for local l in $(libraries)
  557. {
  558. ECHO " - $(l)" ;
  559. }
  560. EXIT ;
  561. }
  562. declare_top_level_targets $(libraries) : $(headers) : $(modular-headers) ;
  563. }
  564. # Returns the properties identifying the toolset. We'll use them
  565. # below to configure checks. These are essentially same as in
  566. # configure.builds, except we don't use address-model and
  567. # architecture - as we're trying to detect them here.
  568. #
  569. rule toolset-properties ( properties * )
  570. {
  571. local toolset = [ property.select <toolset> : $(properties) ] ;
  572. local toolset-version-property = "<toolset-$(toolset:G=):version>" ;
  573. return [ property.select <target-os> <toolset> $(toolset-version-property) : $(properties) ] ;
  574. }
  575. feature.feature deduced-address-model : 32 64 : propagated optional composite hidden ;
  576. feature.compose <deduced-address-model>32 : <address-model>32 ;
  577. feature.compose <deduced-address-model>64 : <address-model>64 ;
  578. rule deduce-address-model ( properties * )
  579. {
  580. local result ;
  581. local filtered = [ toolset-properties $(properties) ] ;
  582. local names = 32 64 ;
  583. local idx = [ configure.find-builds "default address-model" : $(filtered)
  584. : /boost/architecture//32 "32-bit"
  585. : /boost/architecture//64 "64-bit" ] ;
  586. result = $(names[$(idx)]) ;
  587. if $(result)
  588. {
  589. # Normally, returning composite feature here is equivalent to forcing
  590. # consituent properties as well. But we only want to indicate toolset
  591. # deduced default, so also pick whatever address-model is explicitly
  592. # specified, if any.
  593. result = <deduced-address-model>$(result) [ property.select <address-model> : $(properties) ] ;
  594. }
  595. return $(result) ;
  596. }
  597. rule address-model ( )
  598. {
  599. return <conditional>@boostcpp.deduce-address-model ;
  600. }
  601. local deducable-architectures = arm mips1 power sparc x86 combined ;
  602. feature.feature deduced-architecture : $(deducable-architectures) : propagated optional composite hidden ;
  603. for a in $(deducable-architectures)
  604. {
  605. feature.compose <deduced-architecture>$(a) : <architecture>$(a) ;
  606. }
  607. rule deduce-architecture ( properties * )
  608. {
  609. local result ;
  610. local filtered = [ toolset-properties $(properties) ] ;
  611. local names = arm mips1 power sparc x86 combined ;
  612. local idx = [ configure.find-builds "default architecture" : $(filtered)
  613. : /boost/architecture//arm
  614. : /boost/architecture//mips1
  615. : /boost/architecture//power
  616. : /boost/architecture//sparc
  617. : /boost/architecture//x86
  618. : /boost/architecture//combined ] ;
  619. result = $(names[$(idx)]) ;
  620. if $(result)
  621. {
  622. # See comment in deduce-address-model.
  623. result = <deduced-architecture>$(result) [ property.select <architecture> : $(properties) ] ;
  624. }
  625. return $(result) ;
  626. }
  627. rule architecture ( )
  628. {
  629. return <conditional>@boostcpp.deduce-architecture ;
  630. }
粤ICP备19079148号