@@ -39,175 +39,10 @@ tasks:
3939 internal : true
4040 run : " once"
4141 cmds :
42- - task : " boost- download-and-install"
42+ - task : " :utils: boost: download-and-install"
4343 vars :
44- WORK_DIR : " {{.G_DEPS_DIR}}/boost "
45- FILE_SHA256 : " 2128a4c96862b5c0970c1e34d76b1d57e4a1016b80df85ad39667f30b1deba26 "
44+ CMAKE_SETTINGS_DIR : " {{.G_DEPS_CMAKE_SETTINGS_DIR}} "
45+ FILE_SHA256 : " d6c69e4459eb5d6ec208250291221e7ff4a2affde9af6e49c9303b89c687461f "
4646 URL : " https://github.com/boostorg/boost/releases/download/boost-1.87.0/\
4747 boost-1.87.0-b2-nodocs.tar.gz"
48- CMAKE_SETTINGS_DIR : " {{.G_DEPS_CMAKE_SETTINGS_DIR}}"
49- TARGETS :
50- - " filesystem"
51- - " iostreams"
52- - " process"
53- - " program_options"
54- - " regex"
55- - " system"
56-
57- # Runs the bootstrap.sh generate step in the given source directory. Boost only supports
58- # in-source generation and building.
59- #
60- # @param {string} SOURCE_DIR Project source directory.
61- # @param {string} INSTALL_PREFIX Path prefix of where the project should be installed.
62- # @param {string[]} TARGETS Target libraries to build.
63- # @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the generate command.
64- boost-generate :
65- internal : true
66- dir : " {{.SOURCE_DIR}}"
67- cmds :
68- - >-
69- ./bootstrap.sh
70- --prefix="{{.INSTALL_PREFIX}}"
71- --exec-prefix="{{.INSTALL_PREFIX}}"
72- --with-libraries={{(join "," .TARGETS)}}
73- {{- range .EXTRA_ARGS}}
74- "{{.}}"
75- {{- end}}
76-
77- # Runs the b2 build step for boost. The caller must have previously called `generate` on
78- # `SOURCE_DIR` for this task to succeed.
79- #
80- # @param {string} SOURCE_DIR Directory containing the boost source.
81- # @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the build command.
82- # @param {int} [JOBS] The maximum number of concurrent processes to use when building. If
83- # omitted, the b2 default number is used. Before 1.76.0, the number was 1. Since 1.76.0, the
84- # default is the number of cores.
85- boost-build :
86- internal : true
87- dir : " {{.SOURCE_DIR}}"
88- cmds :
89- - >-
90- ./b2
91- {{- range .EXTRA_ARGS}}
92- "{{.}}"
93- {{- end}}
94- {{- if .JOBS}}
95- "-j{{.JOBS}}"
96- {{- end}}
97-
98- # Runs the b2 install step for boost. The caller must have previously called `build` on
99- # `SOURCE_DIR` for this task to succeed. If `CMAKE_SETTINGS_DIR` is set, a settings file will be
100- # created in that directory, containing a `boost_ROOT` CMake variable that points to
101- # `INSTALL_PREFIX`.
102- #
103- # @param {string} SOURCE_DIR Directory containing the boost source.
104- # @param {string} INSTALL_PREFIX Path prefix of where the project should be installed.
105- # @param {string} [CMAKE_SETTINGS_DIR] If set, the directory where the project's CMake settings
106- # file should be stored.
107- # @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the install command.
108- boost-install :
109- internal : true
110- dir : " {{.SOURCE_DIR}}"
111- cmds :
112- - >-
113- ./b2
114- install
115- {{- range .EXTRA_ARGS}}
116- "{{.}}"
117- {{- end}}
118- - >-
119- {{- if .CMAKE_SETTINGS_DIR}}
120- echo "set(BOOST_ROOT
121- \"{{.INSTALL_PREFIX}}\"
122- CACHE PATH
123- \"Package root for boost.\"
124- )" >> "{{.CMAKE_SETTINGS_DIR}}/boost.cmake"
125- {{- end}}
126-
127- # Downloads boost from `URL` and installs boost.
128- #
129- # General parameters
130- # @param {string} [WORK_DIR={{.TASK_DIR}}] Base directory to store the install and src
131- # directories inside.
132- # @param {string} [SOURCE_DIR={{.WORK_DIR}}/boost-src] Directory in which to extract the tar
133- # file.
134- #
135- # Download parameters
136- # @param {string} FILE_SHA256 Content hash to verify the downloaded tar file against.
137- # @param {string} URL
138- #
139- # Boost generate parameters
140- # @param {string} [INSTALL_PREFIX={{.WORK_DIR}}/boost-install] Path prefix of where the project
141- # should be installed.
142- # @param {string[]} TARGETS Target libraries to build.
143- # @param {string[]} [GEN_ARGS] Any additional arguments to pass to the generate command.
144- #
145- # Boost build parameters
146- # @param {int} [JOBS] The maximum number of concurrent processes to use when building. If
147- # omitted, the b2 default number is used. Before 1.76.0, the number was 1. Since 1.76.0, the
148- # default is the number of cores.
149- # @param {string[]} [BUILD_ARGS] Any additional arguments to pass to the build command.
150- #
151- # Boost install parameters
152- # @param {string[]} [INSTALL_ARGS] Any additional arguments to pass to the install command.
153- # @param {string} [CMAKE_SETTINGS_DIR] If set, the directory where the project's CMake settings
154- # file should be stored.
155- boost-download-and-install :
156- internal : true
157- label : " {{.TASK}}:{{.URL}}-{{.INSTALL_PREFIX}}"
158- vars :
159- # General parameters
160- WORK_DIR : >-
161- {{default .ROOT_DIR .WORK_DIR}}
162- SOURCE_DIR : >-
163- {{default (printf "%s/boost-src" .WORK_DIR) .SOURCE_DIR}}
164-
165- # Boost generate parameters
166- INSTALL_PREFIX : >-
167- {{default (printf "%s/boost-install" .WORK_DIR) .INSTALL_PREFIX}}
168- TARGETS :
169- ref : " default (list) .TARGETS"
170- GEN_ARGS :
171- ref : " default (list) .GEN_ARGS"
172-
173- # Boost build parameters
174- BUILD_ARGS :
175- ref : " default (list) .BUILD_ARGS"
176- JOBS : >-
177- {{default "" .JOBS}}
178-
179- # Boost install parameters
180- INSTALL_ARGS :
181- ref : " default (list) .INSTALL_ARGS"
182- CMAKE_SETTINGS_DIR : >-
183- {{default "" .CMAKE_SETTINGS_DIR}}
184- requires :
185- vars : ["FILE_SHA256", "URL"]
186- deps :
187- - task : " :utils:remote:download-and-extract-tar"
188- vars :
189- FILE_SHA256 : " {{.FILE_SHA256}}"
190- OUTPUT_DIR : " {{.SOURCE_DIR}}"
191- URL : " {{.URL}}"
192- cmds :
193- - task : " boost-generate"
194- vars :
195- SOURCE_DIR : " {{.SOURCE_DIR}}"
196- INSTALL_PREFIX : " {{.INSTALL_PREFIX}}"
197- TARGETS :
198- ref : " .TARGETS"
199- EXTRA_ARGS :
200- ref : " .GEN_ARGS"
201- - task : " boost-build"
202- vars :
203- SOURCE_DIR : " {{.SOURCE_DIR}}"
204- JOBS : " {{.JOBS}}"
205- EXTRA_ARGS :
206- ref : " .BUILD_ARGS"
207- - task : " boost-install"
208- vars :
209- SOURCE_DIR : " {{.SOURCE_DIR}}"
210- INSTALL_PREFIX : " {{.INSTALL_PREFIX}}"
211- CMAKE_SETTINGS_DIR : " {{.CMAKE_SETTINGS_DIR}}"
212- EXTRA_ARGS :
213- ref : " .INSTALL_ARGS"
48+ WORK_DIR : " {{.G_DEPS_DIR}}/boost"
0 commit comments