|
19 | 19 | #include <utility> |
20 | 20 | #include <vector> |
21 | 21 |
|
| 22 | +#include <vix/engine/ExecutionPlan.hpp> |
| 23 | +#include <vix/engine/Preset.hpp> |
| 24 | + |
22 | 25 | namespace vix::cli::process |
23 | 26 | { |
24 | 27 | namespace fs = std::filesystem; |
@@ -206,148 +209,8 @@ namespace vix::cli::process |
206 | 209 | std::string capturedFirstLine; |
207 | 210 | }; |
208 | 211 |
|
209 | | - /** |
210 | | - * @brief Embedded build preset description. |
211 | | - */ |
212 | | - struct Preset |
213 | | - { |
214 | | - /** |
215 | | - * @brief Preset public name. |
216 | | - */ |
217 | | - std::string name; |
218 | | - |
219 | | - /** |
220 | | - * @brief CMake generator name, usually "Ninja". |
221 | | - */ |
222 | | - std::string generator; |
223 | | - |
224 | | - /** |
225 | | - * @brief CMake build type, such as "Debug" or "Release". |
226 | | - */ |
227 | | - std::string buildType; |
228 | | - |
229 | | - /** |
230 | | - * @brief Build directory name associated with the preset. |
231 | | - */ |
232 | | - std::string buildDirName; |
233 | | - }; |
234 | | - |
235 | | - /** |
236 | | - * @brief Fully resolved execution plan for a build. |
237 | | - * |
238 | | - * This contains all derived paths, resolved tools, generated files, |
239 | | - * and CMake variables needed to configure and build the project. |
240 | | - */ |
241 | | - struct Plan |
242 | | - { |
243 | | - /** |
244 | | - * @brief User project root directory. |
245 | | - * |
246 | | - * This is the real directory where the user runs Vix from. |
247 | | - * Build directories, exported binaries, local build state, and project |
248 | | - * input snapshots should be based on this path. |
249 | | - * |
250 | | - * For normal CMake projects, this is the same as cmakeSourceDir. |
251 | | - * For vix.app projects, this is the directory containing vix.app. |
252 | | - */ |
253 | | - fs::path userProjectDir; |
254 | | - |
255 | | - /** |
256 | | - * @brief CMake source directory passed to `cmake -S`. |
257 | | - * |
258 | | - * For normal CMake projects, this is the same as userProjectDir. |
259 | | - * For vix.app projects, this points to the generated internal CMake |
260 | | - * directory under `.vix/generated/app`. |
261 | | - */ |
262 | | - fs::path cmakeSourceDir; |
263 | | - |
264 | | - /** |
265 | | - * @brief Root project directory. |
266 | | - * |
267 | | - * Kept for backward compatibility with existing build code. |
268 | | - * New code should prefer userProjectDir or cmakeSourceDir depending on |
269 | | - * the operation being performed. |
270 | | - */ |
271 | | - fs::path projectDir; |
272 | | - |
273 | | - /** |
274 | | - * @brief Default target name used when --build-target is not provided. |
275 | | - * |
276 | | - * For normal CMake projects, this is usually the project directory name. |
277 | | - * For vix.app projects, this is the manifest `name`. |
278 | | - */ |
279 | | - std::string defaultTargetName; |
280 | | - |
281 | | - /** |
282 | | - * @brief True when the active CMake project was generated from vix.app. |
283 | | - */ |
284 | | - bool generatedFromVixApp{false}; |
285 | | - |
286 | | - /** |
287 | | - * @brief Resolved embedded preset. |
288 | | - */ |
289 | | - Preset preset; |
290 | | - |
291 | | - /** |
292 | | - * @brief Build directory used for configure/build artifacts. |
293 | | - */ |
294 | | - fs::path buildDir; |
295 | | - |
296 | | - /** |
297 | | - * @brief Path to the configure log file. |
298 | | - */ |
299 | | - fs::path configureLog; |
300 | | - |
301 | | - /** |
302 | | - * @brief Path to the build log file. |
303 | | - */ |
304 | | - fs::path buildLog; |
305 | | - |
306 | | - /** |
307 | | - * @brief Path to the configuration signature file. |
308 | | - */ |
309 | | - fs::path sigFile; |
310 | | - |
311 | | - /** |
312 | | - * @brief Path to the generated toolchain file when cross-compiling. |
313 | | - */ |
314 | | - fs::path toolchainFile; |
315 | | - |
316 | | - /** |
317 | | - * @brief Resolved Vix SDK CMake package directory, when SDK selection is required. |
318 | | - */ |
319 | | - fs::path sdkConfigDir; |
320 | | - |
321 | | - /** |
322 | | - * @brief Fatal managed SDK resolution error to report before configuring CMake. |
323 | | - */ |
324 | | - std::string sdkResolutionError; |
325 | | - |
326 | | - /** |
327 | | - * @brief Resolved CMake cache variables passed during configure. |
328 | | - */ |
329 | | - std::vector<std::pair<std::string, std::string>> cmakeVars; |
330 | | - |
331 | | - /** |
332 | | - * @brief Signature used to detect whether reconfigure is needed. |
333 | | - */ |
334 | | - std::string signature; |
335 | | - |
336 | | - /** |
337 | | - * @brief Resolved compiler launcher executable, if any. |
338 | | - */ |
339 | | - std::optional<std::string> launcher; |
340 | | - |
341 | | - /** |
342 | | - * @brief Resolved fast-linker compiler flag, if any. |
343 | | - */ |
344 | | - std::optional<std::string> fastLinkerFlag; |
345 | | - |
346 | | - /** |
347 | | - * @brief Fingerprint of important project files used for caching. |
348 | | - */ |
349 | | - std::string projectFingerprint; |
350 | | - }; |
| 212 | + using Preset = vix::engine::Preset; |
| 213 | + using Plan = vix::engine::ExecutionPlan; |
351 | 214 |
|
352 | 215 | /** |
353 | 216 | * @brief Normalizes a raw process exit status into a standard exit code. |
|
0 commit comments