MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
FunctionBuild.hpp
Go to the documentation of this file.
1#pragma once
2
4
5/**
6 * @struct FunctionBuildOptions
7 * @brief What `mayaflux_signatures --functions --build` needs to describe the functions of one header.
8 *
9 * The compile command comes from compile_args when given, else from the
10 * database in build_path through translation_unit.
11 */
13 std::filesystem::path header;
14 std::filesystem::path build_path;
15 std::filesystem::path translation_unit;
16 std::string resource_dir;
17 std::vector<std::string> extra_args;
18 std::vector<std::string> compile_args;
19 std::filesystem::path depfile;
20 std::string depfile_target;
21 bool insert_includes { true };
22};
23
24/**
25 * @brief Writes the function sidecar of one header, for a build step.
26 *
27 * Inserts the sidecar include when the header lacks it, writes the sidecar,
28 * and writes a depfile of the files the scan read when options.depfile is set.
29 * A missing sidecar is stubbed in the scan's temporary directory, and no other
30 * file in the source tree is touched.
31 *
32 * @return 0 on success, 1 with the reason on stderr otherwise.
33 */
34[[nodiscard]] int run_function_build(const FunctionBuildOptions& options);
35
36}
int run_function_build(const FunctionBuildOptions &options)
Writes the function sidecar of one header, for a build step.
What mayaflux_signatures --functions --build needs to describe the functions of one header.