• Home
  • Raw
  • Download

Lines Matching +full:cmake +full:- +full:version

1 # Copyright 2018-2020 Peter Dimov
2 # Distributed under the Boost Software License, Version 1.0.
7 import property-set ;
20 import ./boost-install-dirs ;
22 feature.feature library-type : : free ;
23 feature.feature boost-install.dependency : : free ;
24 feature.feature boost-install.cmakedir : : free ;
25 feature.feature boost-install.includedir : : free ;
26 feature.feature boost-install.libdir : : free ;
27 feature.feature boost-install.lib-target-type : : free ;
29 if "--verbose" in [ modules.peek : ARGV ]
31 .info-enabled = 1 ;
34 if "--debug-boost-install" in [ modules.peek : ARGV ]
36 .debug-enabled = 1 ;
41 if $(.info-enabled)
49 if $(.debug-enabled)
51 ECHO "boost-install:" $(messages) ;
55 # generate-cmake-variant-
57 rule generate-cmake-variant- ( target : sources * : properties * )
59 .info generate-cmake-variant- $(target) ":" $(sources) ;
61 local ps = [ property-set.create $(properties) ] ;
65 local version = [ $(ps).get <version> ] ;
66 .info " version=" $(version) ;
77 local runtime-link = [ $(ps).get <runtime-link> ] ;
78 .info " runtime-link=" $(runtime-link) ;
80 local runtime-debugging = [ $(ps).get <runtime-debugging> ] ;
81 .info " runtime-debugging=" $(runtime-debugging) ;
86 local address-model = [ $(ps).get <address-model> ] ;
87 .info " address-model=" $(address-model) ;
89 local toolset = [ MATCH ^-(.*) : [ common.format-name <toolset> : "" : "" : $(ps) ] ] ;
100 "# Generated by Boost $(version)"
104 print.text "# address-model=$(address-model)" "" : true ;
106 if $(address-model) = 32
132 relevant = [ feature.expand-relevant $(relevant) ] ;
148 …" string(REGEX REPLACE \"([0-9]+[.][0-9]+)([.].*)?\" \"\\\\1\" __boost_pyver ${Boost_PYTHON_VERSI…
174 … " if(NOT Boost_COMPILER STREQUAL \"$(toolset)\" AND NOT Boost_COMPILER STREQUAL \"-$(toolset)\")"
227 print.text "# runtime-link=$(runtime-link)" "" : true ;
229 if $(runtime-link) = static
252 print.text "# runtime-debugging=$(runtime-debugging)" "" : true ;
254 if $(runtime-debugging) = "on"
297 …" _BOOST_SKIPPED(\"$(fname)\" \"single-threaded, Boost_USE_MULTITHREADED is not set and defaults …
302 …" _BOOST_SKIPPED(\"$(fname)\" \"single-threaded, Boost_USE_MULTITHREADED=${Boost_USE_MULTITHREADE…
380 local lib-target-type = [ $(ps).get <boost-install.lib-target-type> ] ;
381 .info " lib-target-type=" $(lib-target-type) ;
383 local loc-prop = LOCATION ;
385 if $(lib-target-type) = IMPORT_LIB
387 loc-prop = IMPLIB ;
390 .info " loc-prop=" $(loc-prop) ;
394 "get_target_property(__boost_imploc $(target) IMPORTED_$(loc-prop)_$(variant:U))"
404 " IMPORTED_$(loc-prop)_$(variant:U) \"${_BOOST_LIBDIR}/$(fname)\""
432 local deps = [ MATCH "boost_(.*)" : [ $(ps).get <boost-install.dependency> ] ] headers ;
445 actions generate-cmake-variant-
451 local rule tag ( name : type ? : property-set )
455 local link = [ $(property-set).get <link> ] ;
460 local relevant = [ $(property-set).get <relevant> ] ;
461 relevant = [ feature.expand-relevant $(relevant) ] ;
465 python = [ $(property-set).get <python> ] ;
469 local r = [ boostcpp.tag $(name) : STATIC_LIB : $(property-set) ] ;
472 r = $(r:B=$(r:B)-$(link)) ;
476 r = $(r:B=$(r:B)-py$(python)) ;
484 # choose-lib-target: get the import library, if present, the
487 local rule choose-lib-target ( sources * )
493 if [ type.is-derived [ $(t).type ] IMPORT_LIB ]
497 else if [ type.is-derived [ $(t).type ] LIB ]
506 # get-dependency-names: Returns the base names of all
509 local rule get-dependency-names ( sources * )
511 local all-targets = [ collect-targets $(sources) ] ;
512 local lib-names ;
513 for local t in [ set.difference $(all-targets) : $(sources) ]
515 if [ $(t).type ] && [ type.is-derived [ $(t).type ] LIB ]
518 local subvariant = [ $(t).creating-subvariant ] ;
519 local main-target = [ $(subvariant).main-target ] ;
520 lib-names += [ $(main-target).name ] ;
523 return [ sequence.unique $(lib-names) ] ;
526 # generate-cmake-variant
528 rule generate-cmake-variant ( project name : property-set : sources * )
530 .debug generate-cmake-variant $(name) ;
537 local lib-target = [ choose-lib-target $(sources) ] ;
539 local other-names = [ get-dependency-names $(sources) ] ;
540 property-set = [ $(property-set).add-raw <boost-install.dependency>$(other-names) ] ;
544 if $(lib-target)
546 .debug " lib-target=" [ $(lib-target).name ] ;
548 local lib-target-type = [ $(lib-target).type ] ;
550 .debug " lib-target-type=" $(lib-target-type) ;
552 local tag = [ tag $(name) : : $(property-set) ] ;
554 … property-set = [ $(property-set).add-raw <boost-install.lib-target-type>$(lib-target-type) ] ;
556 …local a = [ new non-scanning-action $(lib-target) : boost-install.generate-cmake-variant- : $(prop…
558 result += [ new file-target $(tag) : : $(project) : $(a) ] ;
565 return [ property-set.empty ] $(result) ;
568 # generate-cmake-config-
570 local rule path-native-fwd ( path )
582 local rule get-dir ( name : dir )
584 if [ path.is-rooted $(dir) ]
586 dir = [ path-native-fwd $(dir) ] ;
604 rule generate-cmake-config- ( target : sources * : properties * )
606 .info generate-cmake-config- $(target) ":" $(sources) ;
608 local ps = [ property-set.create $(properties) ] ;
612 local version = [ $(ps).get <version> ] ;
613 .info " version=" $(version) ;
618 local library-type = [ $(ps).get <library-type> ] ;
619 .info " library-type=" $(library-type) ;
621 local cmakedir = [ $(ps).get <boost-install.cmakedir> ] ;
624 local includedir = [ $(ps).get <boost-install.includedir> ] ;
627 local libdir = [ $(ps).get <boost-install.libdir> ] ;
640 "# Generated by Boost $(version)"
655 if [ path.is-rooted $(cmakedir) ]
657 local cmakedir-native = [ path-native-fwd $(cmakedir) ] ;
662 "# If the computed and the original directories are symlink-equivalent, use original"
663 "if(EXISTS \"$(cmakedir-native)\")"
664 " get_filename_component(_BOOST_CMAKEDIR_ORIGINAL \"$(cmakedir-native)\" REALPATH)"
666 " set(_BOOST_CMAKEDIR \"$(cmakedir-native)\")"
674 get-dir "_BOOST_INCLUDEDIR" : $(includedir) ;
676 if $(library-type) = INTERFACE
695 get-dir "_BOOST_LIBDIR" : $(libdir) ;
700 "include(${CMAKE_CURRENT_LIST_DIR}/../BoostDetectToolset-$(version).cmake)"
703 " message(STATUS \"Scanning ${CMAKE_CURRENT_LIST_DIR}/lib$(name)-variant*.cmake\")"
706 "file(GLOB __boost_variants \"${CMAKE_CURRENT_LIST_DIR}/lib$(name)-variant*.cmake\")"
773 …" find_package(boost_${dep_$(name)} $(version) EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HI…
836 actions generate-cmake-config-
840 # generate-cmake-config
842 rule generate-cmake-config ( project name : property-set : sources * )
844 .debug generate-cmake-config $(name) ;
846 local pname = [ $(property-set).get <name> ] ;
847 local version = [ $(property-set).get <version> ] ;
848 local location = [ $(property-set).get <location> ] ;
849 local library-type = [ $(property-set).get <library-type> ] ;
850 local cmakedir = [ $(property-set).get <boost-install.cmakedir> ] ;
851 local includedir = [ $(property-set).get <boost-install.includedir> ] ;
852 local libdir = [ $(property-set).get <boost-install.libdir> ] ;
854 local ps = [ property-set.create
855 <name>$(pname) <version>$(version) <location>$(location)
856 <library-type>$(library-type)
857 <boost-install.cmakedir>$(cmakedir)
858 <boost-install.includedir>$(includedir)
859 <boost-install.libdir>$(libdir) ] ;
863 local a = [ new non-scanning-action : boost-install.generate-cmake-config- : $(ps) ] ;
865 result += [ new file-target $(name) : : $(project) : $(a) ] ;
870 # generate-cmake-config-version-
872 rule generate-cmake-config-version- ( target : sources * : properties * )
874 .info generate-cmake-config-version- $(target) ":" $(sources) ;
876 local ps = [ property-set.create $(properties) ] ;
880 local version = [ $(ps).get <version> ] ;
881 .info " version=" $(version) ;
887 "# Generated by Boost $(version)"
889 "set(PACKAGE_VERSION $(version))"
903 actions generate-cmake-config-version-
907 # generate-cmake-config-version
909 rule generate-cmake-config-version ( project name : property-set : sources * )
911 .debug generate-cmake-config-version $(name) ;
913 local pname = [ $(property-set).get <name> ] ;
914 local version = [ $(property-set).get <version> ] ;
915 local location = [ $(property-set).get <location> ] ;
917 local ps = [ property-set.create <name>$(pname) <version>$(version) <location>$(location) ] ;
921 local a = [ new non-scanning-action : boost-install.generate-cmake-config-version- : $(ps) ] ;
923 result += [ new file-target $(name) : : $(project) : $(a) ] ;
928 # install-cmake-config-
930 local rule install-cmake-config- ( install-or-stage : location : includedir : libdir : version : na…
932 #.debug install-cmake-config- $(name) ;
938 local loc = $(location)/$(name)-$(version) ;
940 local library-type = UNKNOWN ;
944 library-type = INTERFACE ;
947 …>$(name) <version>$(version) <library-type>$(library-type) <boost-install.cmakedir>$(location) <bo…
949 …r += [ generate $(install-or-stage)/$(name)-config.cmake : $(name) : <generating-rule>@boost-insta…
950 …r += [ install $(install-or-stage)-$(name)-config.cmake : $(install-or-stage)/$(name)-config.cmake
952 …[ generate $(install-or-stage)/$(name)-config-version.cmake : $(name) : <generating-rule>@boost-in…
953 …r += [ install $(install-or-stage)-$(name)-config-version.cmake : $(install-or-stage)/$(name)-conf…
955 if $(library-type) != INTERFACE
957 …local v = [ generate $(install-or-stage)/$(name)-variant.cmake : $(name) : <generating-rule>@boost
959 … r += [ install $(install-or-stage)-$(name)-config-variant.cmake : $(v) : <location>$(loc) ] ;
964 .info "target '$(name)' not prefixed by 'boost_', omitting CMake config" ;
970 # install-or-stage-cmake-config
974 rule install-or-stage-cmake-config ( name * : install-or-stage : includedir : libdir : cmakedir )
978 if "--no-cmake-config" in [ modules.peek : ARGV ]
980 alias $(install-or-stage)-cmake-config ;
981 $(p).mark-target-as-explicit $(install-or-stage)-cmake-config ;
985 includedir = [ path.relative-to $(cmakedir) $(includedir) ] ;
986 libdir = [ path.relative-to $(cmakedir) $(libdir) ] ;
994 …configs += [ install-cmake-config- $(install-or-stage) : $(cmakedir) : $(includedir) : $(libdir) :…
997 # Target install/stage-detect-toolset
999 local boost-install-dir = [ modules.binding $(__name__) ] ;
1000 boost-install-dir = $(boost-install-dir:D) ;
1002 …tall-or-stage)-detect-toolset : $(boost-install-dir)/BoostDetectToolset.cmake : <location>$(cmaked…
1003 $(p).mark-target-as-explicit $(install-or-stage)-detect-toolset ;
1005 # Target install/stage-boost-config
1007 …install $(install-or-stage)-boost-config : $(boost-install-dir)/BoostConfig.cmake : <location>$(cm…
1008 $(p).mark-target-as-explicit $(install-or-stage)-boost-config ;
1010 # Target install/stage-boost-config-version
1012 project.load [ path.make $(boost-install-dir) ] ;
1014 …install $(install-or-stage)-boost-config-version : /boost/tools/boost_install//BoostConfigVersion.
1015 $(p).mark-target-as-explicit $(install-or-stage)-boost-config-version ;
1017 # Target install/stage-cmake-config
1019 …tall-or-stage)-cmake-config : $(configs) $(install-or-stage)-detect-toolset $(install-or-stage)-bo…
1020 $(p).mark-target-as-explicit $(install-or-stage)-cmake-config ;
1024 # install-cmake-config
1026 rule install-cmake-config ( name * )
1028 #.debug install-cmake-config $(name) ;
1030 local includedir = [ boost-install-dirs.includedir ] ;
1031 local libdir = [ boost-install-dirs.libdir ] ;
1032 local cmakedir = [ boost-install-dirs.cmakedir ] ;
1033 local header-subdir = [ boost-install-dirs.header-subdir ] ;
1035 if $(header-subdir)
1037 includedir = $(includedir)/$(header-subdir) ;
1040 install-or-stage-cmake-config $(name) : install : $(includedir) : $(libdir) : $(cmakedir) ;
1043 rule stage-cmake-config ( name * )
1046 local libdir = [ boost-install-dirs.stage-libdir ] ;
1047 local cmakedir = $(libdir)/cmake ;
1049 install-or-stage-cmake-config $(name) : stage : $(includedir) : $(libdir) : $(cmakedir) ;
1052 # stage-cmake-config
1054 # collect-targets: Returns the targets and all their dependencies.
1056 # TODO: Factor this out as a utility in virtal-target.jam
1058 rule collect-targets ( targets * )
1064 s += [ $(t).creating-subvariant ] ;
1073 $(i).all-referenced-targets $(result) ;
1087 # get-dependency-projects: Returns all the projects of any dependency of the sources.
1089 rule get-dependency-projects ( sources * )
1092 for local t in [ collect-targets $(sources) ]
1099 # generate-dependencies: find and generate the stage and install targets
1102 rule generate-dependencies ( project name ? : property-set : sources * )
1104 local stage-targets ;
1105 local stage-or-install = [ $(property-set).get <name> ] ;
1106 local excluded-projects = $(project) [ $(project).find /boost ] ;
1107 for local p in [ get-dependency-projects $(sources) ] [ $(project).find /boost/headers ]
1109 if ! ( $(p) in $(excluded-projects) )
1111 stage-targets += [ $(p).find $(stage-or-install) : no-error ] ;
1114 local props = [ $(property-set).propagated ] ;
1116 local usage-requirements = [ property-set.empty ] ;
1117 for local t in $(stage-targets)
1120 usage-requirements = [ $(usage-requirements).add $(g[1]) ] ;
1121 result += $(g[2-]) ;
1123 return $(usage-requirements) $(result) ;
1126 # boost-install
1128 local rule install-stage-subdir ( properties * )
1130 local ps = [ property-set.create $(properties) ] ;
1143 r = $(r:B=$(r:B)-python$(python)) ;
1149 rule stage-subdir ( properties * )
1151 local r = [ install-stage-subdir $(properties) ] ;
1153 local libdir = [ boost-install-dirs.stage-libdir ] ;
1158 rule install-subdir ( properties * )
1160 local r = [ install-stage-subdir $(properties) ] ;
1162 local libdir = [ boost-install-dirs.libdir ] ;
1167 rule boost-install ( libraries * )
1169 .debug boost-install $(libraries) ;
1192 package.install install-libraries Boost
1193 : <install-no-version-symlinks>on
1199 $(p).mark-target-as-explicit install-libraries ;
1201 …install install-unprefixed-static : $(unprefixed) : <install-type>STATIC_LIB <conditional>@boost-i…
1202 $(p).mark-target-as-explicit install-unprefixed-static ;
1204 …all install-unprefixed-shared : $(unprefixed) : <install-type>SHARED_LIB <install-no-version-symli…
1205 $(p).mark-target-as-explicit install-unprefixed-shared ;
1207 install-cmake-config $(libraries) ;
1209 …generate install-dependencies : $(libraries) : <generating-rule>@boost-install%generate-dependenci…
1210 $(p).mark-target-as-explicit install-dependencies ;
1212 …alias install : install-libraries install-unprefixed-static install-unprefixed-shared install-cmak…
1213 $(p).mark-target-as-explicit install ;
1217 local stage-libdir = [ boost-install-dirs.stage-libdir ] ;
1219 stage-cmake-config $(libraries) ;
1221 …install stage-libraries-static : $(libraries) : <location>$(stage-libdir) <install-dependencies>on…
1222 $(p).mark-target-as-explicit stage-libraries-static ;
1224 …stall stage-libraries-shared : $(libraries) : <location>$(stage-libdir) <install-dependencies>on <…
1225 $(p).mark-target-as-explicit stage-libraries-shared ;
1227 …install stage-unprefixed-static : $(unprefixed) : <install-type>STATIC_LIB <conditional>@boost-ins…
1228 $(p).mark-target-as-explicit stage-unprefixed-static ;
1230 …nstall stage-unprefixed-shared : $(unprefixed) : <install-type>SHARED_LIB <install-no-version-syml…
1231 $(p).mark-target-as-explicit stage-unprefixed-shared ;
1233 …generate stage-dependencies : $(libraries) : <generating-rule>@boost-install%generate-dependencies…
1234 $(p).mark-target-as-explicit stage-dependencies ;
1236 …alias stage : stage-libraries-static stage-libraries-shared stage-unprefixed-static stage-unprefix…
1237 $(p).mark-target-as-explicit stage ;