-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontext.h
63 lines (43 loc) · 1.66 KB
/
context.h
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
#pragma once
#include <chrono>
#include <string>
#include <string_view>
#include <vector>
namespace app {
namespace bs {
enum class target_build_type { BINARY_UNKNOWN, BINARY_APPLICATION, STATIC_LIBRARY, SHARED_LIBRARY };
using clock_type = std::chrono::steady_clock;
struct target;
struct target final {
target( ) = default;
std::string name;
std::string output;
std::string output_path;
target_build_type type;
std::vector<std::string> include_directories;
std::vector<std::string> sources;
std::vector<target> sub_targets; /// dependent targets
std::vector<std::string> compiled_files;
std::vector<std::string> link_libraries;
std::string run_time_path; /// rpath
};
struct context final {
context( ) = default;
struct {
std::string support_cxx_17 = "-std=c++17";
std::string verbosity_warnings_all = "-pedantic -Wall";
} flags;
std::string profile_name;
std::string base_path;
std::string build_path;
clock_type::time_point build_start;
clock_type::time_point build_end;
size_t jobs = 0;
std::string cxx_compiller = "g++";
std::vector<std::string> cxx_extensions = {".cpp", ".cxx", ".cc"};
std::vector<std::string> cxx_compile_options = {"-c", "-pipe"};
std::vector<std::string> include_directories;
std::vector<target> build_targets;
};
} // namespace bs
} // namespace app