Skip to content

Commit fd7c5c1

Browse files
WIP
1 parent 1b38baf commit fd7c5c1

20 files changed

+879
-364
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@
1919
[submodule "yaml-cpp"]
2020
path = External/yaml-cpp
2121
url = https://github.com/jbeder/yaml-cpp.git
22+
[submodule "filesystem"]
23+
path = External/filesystem
24+
url = https://github.com/gulrak/filesystem.git

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/External/yaml-cpp")
1616
# =========================================================================
1717
# mkdirp
1818
# =========================================================================
19+
20+
1921
add_library(path_normalize "${CMAKE_CURRENT_LIST_DIR}/External/mkdirp/deps/path-normalize/path-normalize.c")
2022
target_include_directories(path_normalize PUBLIC "${CMAKE_CURRENT_LIST_DIR}/External/mkdirp/deps")
2123

@@ -27,6 +29,10 @@ target_include_directories(mkdirp PUBLIC "${CMAKE_CURRENT_LIST_DIR}/External/mkd
2729

2830
target_link_libraries(mkdirp PRIVATE path_normalize strdup)
2931

32+
# =========================================================================
33+
# filesystem
34+
# =========================================================================
35+
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/External/filesystem")
3036

3137
# =========================================================================
3238
# Generate yaml files as c
@@ -72,4 +78,4 @@ target_include_directories(runcpp2 PRIVATE "${CMAKE_CURRENT_LIST_DIR}/Include"
7278
"${CMAKE_CURRENT_LIST_DIR}/External/tinydir"
7379
"${CMAKE_CURRENT_LIST_DIR}/External/cfgpath")
7480

75-
target_link_libraries(runcpp2 PRIVATE CLI11::CLI11 ssLogger mkdirp yaml-cpp)
81+
target_link_libraries(runcpp2 PRIVATE CLI11::CLI11 ssLogger yaml-cpp ghc_filesystem)

DefaultYAMLs/CompilerProfilesSchema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"type": "object",
66
"properties":
77
{
8+
"PreferredProfile":
9+
{
10+
"type": "string",
11+
"description": "A default compiler profile to be used if not specified while running the build script"
12+
},
813
"CompilerProfiles":
914
{
1015
"type": "array",

DefaultYAMLs/DefaultCompilerProfiles.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
# yaml-language-server: $schema=./CompilerProfilesSchema.json
22

33
---
4+
PreferredProfile: "g++"
45
CompilerProfiles:
56
- Name: "g++"
67
FileExtensions: [cpp, cc, cxx]
78
Languages: ["c++"]
89
SetupSteps: []
910
ObjectFileExtensions:
1011
Windows: obj
11-
#Or Unix: o
12-
Linux: o
13-
MacOS: o
12+
Unix: o
1413
SharedLibraryExtensions:
1514
Windows: [dll, lib]
1615
Linux: [so]
1716
MacOS: [dylib]
1817
StaticLibraryExtensions:
1918
Windows: [lib]
20-
#Or Unix: a
21-
Linux: [a]
22-
MacOS: [a]
19+
Unix: [a]
2320
DebugSymbolFileExtensions:
2421
Windows: []
2522
Unix: []

DefaultYAMLs/DefaultScriptInfo.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ Language: "c++"
55
PreferredProfiles: ["g++"]
66
Dependencies:
77
- Name: lib1
8-
LibraryType: static
8+
Platforms: [Windows, Linux, MacOS]
9+
LibraryType: Static
910
SearchLibraryName: lib1
1011
Source:
11-
Type: git
12+
Type: Git
1213
Value: "https://github.com/USER/REPO.git"
1314
Setup:
1415
Windows:
@@ -20,10 +21,11 @@ Dependencies:
2021
- "cd build && cmake .."
2122
- "cd build && cmake --build . --config Release"
2223
- Name: lib2
23-
LibraryType: object
24+
Platforms: [All]
25+
LibraryType: Object
2426
SearchLibraryName: lib2
2527
Source:
26-
Type: local
28+
Type: Local
2729
Value: "./lib2"
2830
Setup:
2931
Windows:

DefaultYAMLs/ScriptInfoSchema.json

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,19 @@
3333
"type": "string",
3434
"description": "Dependency name"
3535
},
36+
"Platforms":
37+
{
38+
"type": "array",
39+
"items":
40+
{
41+
"type":"string"
42+
}
43+
},
3644
"LibraryType":
3745
{
3846
"type": "string",
39-
"enum": ["static", "object", "shared"],
40-
"description": "Library Type (static, object, shared)"
47+
"enum": ["Static", "Object", "Shared", "Header"],
48+
"description": "Library Type (Static, Object, Shared, Header)"
4149
},
4250
"SearchLibraryName":
4351
{
@@ -52,8 +60,8 @@
5260
"Type":
5361
{
5462
"type": "string",
55-
"enum": ["git", "local"],
56-
"description": "The type of the dependency (git/local)"
63+
"enum": ["Git", "Local"],
64+
"description": "The type of the dependency (Git/Local)"
5765
},
5866
"Value":
5967
{
@@ -94,6 +102,14 @@
94102
}
95103
},
96104
"MacOS":
105+
{
106+
"type": "array",
107+
"items":
108+
{
109+
"type":"string"
110+
}
111+
},
112+
"All":
97113
{
98114
"type": "array",
99115
"items":
@@ -108,6 +124,7 @@
108124
"required":
109125
[
110126
"Name",
127+
"Platforms",
111128
"LibraryType",
112129
"SearchLibraryName",
113130
"Source"

External/filesystem

Submodule filesystem added at 8a2edd6

Include/runcpp2/CompilerProfile.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <string>
88
#include <unordered_map>
9+
#include <unordered_set>
910
#include <vector>
1011

1112
namespace runcpp2
@@ -14,8 +15,8 @@ namespace runcpp2
1415
{
1516
public:
1617
std::string Name;
17-
std::vector<std::string> FileExtensions;
18-
std::vector<std::string> Languages;
18+
std::unordered_set<std::string> FileExtensions;
19+
std::unordered_set<std::string> Languages;
1920
std::vector<std::string> SetupSteps;
2021
std::unordered_map<std::string, std::string> ObjectFileExtensions;
2122
std::unordered_map<std::string, std::vector<std::string>> SharedLibraryExtensions;

Include/runcpp2/DependencyInfo.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
#include "runcpp2/DependencyLibraryType.hpp"
55
#include "runcpp2/DependencySource.hpp"
66
#include <string>
7+
#include <unordered_set>
78

89
namespace runcpp2
910
{
1011
class DependencyInfo
1112
{
1213
public:
1314
std::string Name;
15+
std::unordered_set<std::string> Platforms;
1416
DependencyLibraryType LibraryType;
1517
std::string SearchLibraryName;
1618
DependencySource Source;

Include/runcpp2/DependencyLibraryType.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace runcpp2
88
STATIC,
99
SHARED,
1010
OBJECT,
11+
HEADER,
1112
COUNT
1213
};
1314
}

0 commit comments

Comments
 (0)