Sequoia
Loading...
Searching...
No Matches
ProjectCreator.hpp
Go to the documentation of this file.
1
2// Copyright Oliver J. Rosten 2021. //
3// Distributed under the GNU GENERAL PUBLIC LICENSE, Version 3.0. //
4// (See accompanying file LICENSE.md or copy at //
5// https://www.gnu.org/licenses/gpl-3.0.en.html) //
7
8#pragma once
9
17
18#include <vector>
19
20namespace sequoia::testing
21{
22 enum class build_invocation { no = 0, yes, launch_ide };
23 enum class git_invocation : bool { no = 0, yes};
24
26 {
27 std::string copyright{};
28 std::filesystem::path project_root{};
29 indentation code_indent{"\t"};
30 build_invocation do_build{build_invocation::launch_ide};
31 git_invocation use_git{git_invocation::yes};
32 std::filesystem::path output{};
33 };
34
35 void check_indent(const indentation& ind);
36
37 void generate_test_main(std::string_view copyright, const std::filesystem::path& projRoot, indentation codeIndent);
38
39 void generate_build_system_files(const std::filesystem::path& parentProjRoot, const std::filesystem::path& projRoot);
40
41 [[nodiscard]]
42 build_paths make_new_build_paths(const std::filesystem::path& projectRoot, const build_paths& parentBuildPaths);
43
44 void init_projects(const project_paths& parentProjectPaths, const std::vector<project_data>& projects, std::ostream& stream);
45
46 [[nodiscard]]
47 runtime::shell_command git_first_cmd(const std::filesystem::path& root, const std::filesystem::path& output);
48
49 [[nodiscard]]
50 runtime::shell_command launch_cmd(const project_paths& parentProjectPaths, const std::filesystem::path& root, const std::filesystem::path& buildDir);
51}
Shell Command specifically for the testing framework.
A collection of functions for formatting test output.
File paths pertaining to a sequoia project.
Type-safe mechanism for indentations.
Definition: Indent.hpp:22
Definition: ShellCommands.hpp:20
Paths relating to the build directory.
Definition: ProjectPaths.hpp:227
Paths used by the project.
Definition: ProjectPaths.hpp:469
Definition: ProjectCreator.hpp:26