Skip to content

Commit e8f07d5

Browse files
Merge pull request #1 from Neko-Box-Coder/rapidyaml
Rapidyaml Implementation
2 parents 3eb8e8c + 14a386d commit e8f07d5

29 files changed

+409
-248
lines changed

.gitmodules

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "CLI11"]
2-
path = External/CLI11
3-
url = https://github.com/CLIUtils/CLI11.git
41
[submodule "ssLogger"]
52
path = External/ssLogger
63
url = https://github.com/Neko-Box-Coder/ssLogger.git
@@ -10,12 +7,12 @@
107
[submodule "Embed2C"]
118
path = External/Embed2C
129
url = https://github.com/Neko-Box-Coder/Embed2C.git
13-
[submodule "yaml-cpp"]
14-
path = External/yaml-cpp
15-
url = https://github.com/jbeder/yaml-cpp.git
1610
[submodule "filesystem"]
1711
path = External/filesystem
1812
url = https://github.com/gulrak/filesystem.git
1913
[submodule "System2"]
2014
path = External/System2
2115
url = https://github.com/Neko-Box-Coder/System2.git
16+
[submodule "rapidyaml"]
17+
path = External/rapidyaml
18+
url = https://github.com/biojppm/rapidyaml.git

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ set(CMAKE_CXX_STANDARD 11)
99

1010
option(RUNCPP2_UPDATE_DEFAULT_YAMLS "Update default yaml files" OFF)
1111

12-
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/External/CLI11")
1312
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/External/ssLogger")
14-
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/External/yaml-cpp")
13+
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/External/rapidyaml")
1514

1615
# =========================================================================
1716
# filesystem
@@ -80,7 +79,7 @@ add_executable(runcpp2 "${CMAKE_CURRENT_LIST_DIR}/Src/runcpp2/Data/CompilerInfo
8079
target_include_directories(runcpp2 PRIVATE "${CMAKE_CURRENT_LIST_DIR}/Include"
8180
"${CMAKE_CURRENT_LIST_DIR}/External/cfgpath")
8281

83-
target_link_libraries(runcpp2 PRIVATE CLI11::CLI11 ssLogger yaml-cpp ghc_filesystem System2)
82+
target_link_libraries(runcpp2 PRIVATE ssLogger ghc_filesystem System2 ryml::ryml)
8483

8584
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
8685
set(STANDARD_COMPILE_FLAGS "/utf-8;/W1")

External/CLI11

Lines changed: 0 additions & 1 deletion
This file was deleted.

External/rapidyaml

Submodule rapidyaml added at 3ef11e1

External/yaml-cpp

Lines changed: 0 additions & 1 deletion
This file was deleted.

Include/runcpp2/Data/CompilerInfo.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef RUNCPP2_DATA_COMPILER_INFO_HPP
22
#define RUNCPP2_DATA_COMPILER_INFO_HPP
33

4-
#include "yaml-cpp/yaml.h"
4+
#include "ryml.hpp"
55

66
#include <string>
77

@@ -25,7 +25,7 @@ namespace runcpp2
2525

2626
Args CompileArgs;
2727

28-
bool ParseYAML_Node(YAML::Node& profileNode);
28+
bool ParseYAML_Node(ryml::ConstNodeRef& profileNode);
2929
std::string ToString(std::string indentation) const;
3030
};
3131
}

Include/runcpp2/Data/CompilerProfile.hpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#include "runcpp2/Data/CompilerInfo.hpp"
55
#include "runcpp2/Data/LinkerInfo.hpp"
66

7+
#include "runcpp2/Data/ParseCommon.hpp"
8+
#include "ryml.hpp"
9+
710
#include <string>
811
#include <unordered_map>
912
#include <unordered_set>
@@ -20,15 +23,15 @@ namespace runcpp2
2023
std::unordered_set<std::string> FileExtensions;
2124
std::unordered_set<std::string> Languages;
2225
std::vector<std::string> SetupSteps;
23-
std::unordered_map<std::string, std::string> ObjectFileExtensions;
24-
std::unordered_map<std::string, std::vector<std::string>> SharedLibraryExtensions;
25-
std::unordered_map<std::string, std::vector<std::string>> StaticLibraryExtensions;
26-
std::unordered_map<std::string, std::vector<std::string>> DebugSymbolFileExtensions;
26+
std::unordered_map<PlatformName, std::string> ObjectFileExtensions;
27+
std::unordered_map<PlatformName, std::vector<std::string>> SharedLibraryExtensions;
28+
std::unordered_map<PlatformName, std::vector<std::string>> StaticLibraryExtensions;
29+
std::unordered_map<PlatformName, std::vector<std::string>> DebugSymbolFileExtensions;
2730

2831
CompilerInfo Compiler;
2932
LinkerInfo Linker;
3033

31-
bool ParseYAML_Node(YAML::Node& profileNode);
34+
bool ParseYAML_Node(ryml::ConstNodeRef& profileNode);
3235
std::string ToString(std::string indentation) const;
3336
};
3437
}

Include/runcpp2/Data/DependencyInfo.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#include "runcpp2/Data/DependencySetup.hpp"
88
#include "runcpp2/Data/ParseCommon.hpp"
99

10+
#include "ryml.hpp"
11+
1012
#include <string>
1113
#include <unordered_set>
1214

@@ -26,7 +28,7 @@ namespace runcpp2
2628
std::unordered_map<ProfileName, DependencyLinkProperty> LinkProperties;
2729
std::unordered_map<PlatformName, DependencySetup> Setup;
2830

29-
bool ParseYAML_Node(YAML::Node& node);
31+
bool ParseYAML_Node(ryml::ConstNodeRef& node);
3032
std::string ToString(std::string indentation) const;
3133
};
3234
}

Include/runcpp2/Data/DependencyLinkProperty.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
#define RUNCPP2_DATA_DEPENDENCY_LINK_PROPERTY_HPP
33

44
#include "runcpp2/Data/ParseCommon.hpp"
5-
#include "yaml-cpp/yaml.h"
5+
6+
#include "ryml.hpp"
7+
8+
#include <vector>
9+
#include <unordered_map>
610
#include <string>
711

812
namespace runcpp2
@@ -17,7 +21,7 @@ namespace runcpp2
1721
std::vector<std::string> ExcludeLibraryNames;
1822
std::unordered_map<PlatformName, std::vector<std::string>> AdditionalLinkOptions;
1923

20-
bool ParseYAML_Node(YAML::Node& node);
24+
bool ParseYAML_Node(ryml::ConstNodeRef& node);
2125
std::string ToString(std::string indentation) const;
2226
};
2327
}

Include/runcpp2/Data/DependencySetup.hpp

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

44
#include "runcpp2/Data/ParseCommon.hpp"
55

6-
#include "yaml-cpp/yaml.h"
6+
#include "ryml.hpp"
77
#include <string>
88
#include <unordered_map>
99
#include <vector>
@@ -17,7 +17,7 @@ namespace runcpp2
1717
public:
1818
std::unordered_map<ProfileName, std::vector<std::string>> SetupSteps;
1919

20-
bool ParseYAML_Node(YAML::Node& node);
20+
bool ParseYAML_Node(ryml::ConstNodeRef& node);
2121
std::string ToString(std::string indentation) const;
2222
};
2323
}

0 commit comments

Comments
 (0)