-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruncpp2.hpp
More file actions
70 lines (61 loc) · 1.87 KB
/
Copy pathruncpp2.hpp
File metadata and controls
70 lines (61 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef RUNCPP2_RUNCPP2_HPP
#define RUNCPP2_RUNCPP2_HPP
#include "runcpp2/Data/Profile.hpp"
#include "runcpp2/Data/ScriptInfo.hpp"
#include <string>
#include <vector>
namespace runcpp2
{
enum class CmdOptions
{
NONE,
RESET_CACHE,
RESET_USER_CONFIG,
EXECUTABLE,
HELP,
REMOVE_DEPENDENCIES,
LOCAL,
SHOW_USER_CONFIG,
SCRIPT_TEMPLATE,
WATCH,
BUILD,
VERSION,
LOG_LEVEL,
COUNT
};
enum class PipelineResult
{
UNEXPECTED_FAILURE,
SUCCESS,
EMPTY_PROFILES,
INVALID_SCRIPT_PATH,
INVALID_CONFIG_PATH,
INVALID_BUILD_DIR,
INVALID_SCRIPT_INFO,
NO_AVAILABLE_PROFILE,
DEPENDENCIES_FAILED,
COMPILE_LINK_FAILED,
INVALID_PROFILE,
RUN_SCRIPT_FAILED,
COUNT
};
struct OptionInfo
{
CmdOptions Option;
bool HasValue;
std::string Value;
OptionInfo(CmdOptions option, bool hasValue = false, const std::string& value = "")
: Option(option), HasValue(hasValue), Value(value) {}
};
void GetDefaultScriptInfo(std::string& scriptInfo);
PipelineResult StartPipeline( const std::string& scriptPath,
const std::vector<Data::Profile>& profiles,
const std::string& configPreferredProfile,
const std::unordered_map<CmdOptions, std::string> currentOptions,
const std::vector<std::string>& runArgs,
const Data::ScriptInfo* lastScriptInfo,
Data::ScriptInfo& outScriptInfo,
const std::string& buildOutputDir,
int& returnStatus);
}
#endif