Skip to content

Commit 4e09beb

Browse files
Renaming ProfilesCompilesFiles to ProfilesProcessPaths
1 parent 23a1645 commit 4e09beb

File tree

11 files changed

+45
-45
lines changed

11 files changed

+45
-45
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ add_library(runcpp2 STATIC
129129
"${CMAKE_CURRENT_LIST_DIR}/Src/runcpp2/Data/ProfilesCommands.cpp"
130130
"${CMAKE_CURRENT_LIST_DIR}/Src/runcpp2/Data/ProfilesFlagsOverride.cpp"
131131
"${CMAKE_CURRENT_LIST_DIR}/Src/runcpp2/Data/ScriptInfo.cpp"
132-
"${CMAKE_CURRENT_LIST_DIR}/Src/runcpp2/Data/ProfilesCompilesFiles.cpp"
132+
"${CMAKE_CURRENT_LIST_DIR}/Src/runcpp2/Data/ProfilesProcessPaths.cpp"
133133
"${CMAKE_CURRENT_LIST_DIR}/Src/runcpp2/Data/FilesTypesInfo.cpp"
134134
"${CMAKE_CURRENT_LIST_DIR}/Src/runcpp2/Data/StageInfo.cpp"
135135
"${CMAKE_CURRENT_LIST_DIR}/Src/runcpp2/Data/ProfilesDefines.cpp"

Include/runcpp2/Data/ProfilesCompilesFiles.hpp renamed to Include/runcpp2/Data/ProfilesProcessPaths.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef RUNCPP2_DATA_PROFILES_COMPILES_FILES_HPP
2-
#define RUNCPP2_DATA_PROFILES_COMPILES_FILES_HPP
1+
#ifndef RUNCPP2_DATA_PROFILES_PROCESS_PATHS_HPP
2+
#define RUNCPP2_DATA_PROFILES_PROCESS_PATHS_HPP
33

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

@@ -14,14 +14,14 @@ namespace runcpp2
1414
{
1515
namespace Data
1616
{
17-
class ProfilesCompilesFiles
17+
class ProfilesProcessPaths
1818
{
1919
public:
20-
std::unordered_map<ProfileName, std::vector<ghc::filesystem::path>> CompilesFiles;
20+
std::unordered_map<ProfileName, std::vector<ghc::filesystem::path>> Paths;
2121

2222
bool ParseYAML_Node(ryml::ConstNodeRef& node);
2323
std::string ToString(std::string indentation) const;
24-
bool Equals(const ProfilesCompilesFiles& other) const;
24+
bool Equals(const ProfilesProcessPaths& other) const;
2525
};
2626
}
2727
}

Include/runcpp2/Data/ScriptInfo.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "runcpp2/Data/DependencyInfo.hpp"
55
#include "runcpp2/Data/ProfilesFlagsOverride.hpp"
66
#include "runcpp2/Data/ParseCommon.hpp"
7-
#include "runcpp2/Data/ProfilesCompilesFiles.hpp"
7+
#include "runcpp2/Data/ProfilesProcessPaths.hpp"
88
#include "runcpp2/Data/ProfilesDefines.hpp"
99
#include "runcpp2/Data/ProfilesCommands.hpp"
1010

@@ -26,8 +26,8 @@ namespace runcpp2
2626
std::unordered_map<PlatformName, ProfilesFlagsOverride> OverrideCompileFlags;
2727
std::unordered_map<PlatformName, ProfilesFlagsOverride> OverrideLinkFlags;
2828

29-
std::unordered_map<PlatformName, ProfilesCompilesFiles> OtherFilesToBeCompiled;
30-
std::unordered_map<PlatformName, ProfilesCompilesFiles> IncludePaths;
29+
std::unordered_map<PlatformName, ProfilesProcessPaths> OtherFilesToBeCompiled;
30+
std::unordered_map<PlatformName, ProfilesProcessPaths> IncludePaths;
3131

3232
std::vector<DependencyInfo> Dependencies;
3333

Src/Tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ create_data_test(FlagsOverrideInfoTest)
2323
create_data_test(DependencySourceTest)
2424
create_data_test(FilesToCopyInfoTest)
2525
create_data_test(ProfilesCommandsTest)
26-
create_data_test(ProfilesCompilesFilesTest)
26+
create_data_test(ProfilesProcessPathsTest)
2727
create_data_test(ProfilesDefinesTest)
2828
create_data_test(DependencyLinkPropertyTest)
2929
create_data_test(FilesTypesInfoTest)

Src/Tests/Data/ProfilesCompilesFilesTest.cpp renamed to Src/Tests/Data/ProfilesProcessPathsTest.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "runcpp2/Data/ProfilesCompilesFiles.hpp"
1+
#include "runcpp2/Data/ProfilesProcessPaths.hpp"
22
#include "ssTest.hpp"
33
#include "runcpp2/YamlLib.hpp"
44
#include "runcpp2/runcpp2.hpp"
@@ -9,7 +9,7 @@ int main(int argc, char** argv)
99

1010
ssTEST_INIT_TEST_GROUP();
1111

12-
ssTEST("ProfilesCompilesFiles Should Parse Valid YAML")
12+
ssTEST("ProfilesProcessPaths Should Parse Valid YAML")
1313
{
1414
ssTEST_OUTPUT_SETUP
1515
(
@@ -25,42 +25,42 @@ int main(int argc, char** argv)
2525
ryml::Tree tree = ryml::parse_in_arena(c4::to_csubstr(yamlStr));
2626
ryml::ConstNodeRef root = tree.rootref();
2727

28-
runcpp2::Data::ProfilesCompilesFiles profilesCompilesFiles;
28+
runcpp2::Data::ProfilesProcessPaths profilesProcessPaths;
2929
);
3030

3131
ssTEST_OUTPUT_EXECUTION
3232
(
3333
ryml::ConstNodeRef nodeRef = root;
34-
bool parseResult = profilesCompilesFiles.ParseYAML_Node(nodeRef);
34+
bool parseResult = profilesProcessPaths.ParseYAML_Node(nodeRef);
3535
);
3636

3737
ssTEST_OUTPUT_ASSERT("ParseYAML_Node should succeed", parseResult);
3838

3939
//Verify parsed values
4040
ssTEST_OUTPUT_ASSERT( "MSVC files count",
41-
profilesCompilesFiles.CompilesFiles.at("MSVC").size() == 2);
41+
profilesProcessPaths.Paths.at("MSVC").size() == 2);
4242
ssTEST_OUTPUT_ASSERT( "GCC files count",
43-
profilesCompilesFiles.CompilesFiles.at("GCC").size() == 2);
43+
profilesProcessPaths.Paths.at("GCC").size() == 2);
4444
ssTEST_OUTPUT_ASSERT( "MSVC first file",
45-
profilesCompilesFiles.CompilesFiles.at("MSVC").at(0) ==
45+
profilesProcessPaths.Paths.at("MSVC").at(0) ==
4646
"src/main.cpp");
4747
ssTEST_OUTPUT_ASSERT( "GCC last file",
48-
profilesCompilesFiles.CompilesFiles.at("GCC").at(1) ==
48+
profilesProcessPaths.Paths.at("GCC").at(1) ==
4949
"src/optimized.cpp");
5050

5151
//Test ToString() and Equals()
5252
ssTEST_OUTPUT_EXECUTION
5353
(
54-
std::string yamlOutput = profilesCompilesFiles.ToString("");
54+
std::string yamlOutput = profilesProcessPaths.ToString("");
5555
ryml::Tree outputTree = ryml::parse_in_arena(ryml::to_csubstr(yamlOutput));
5656

57-
runcpp2::Data::ProfilesCompilesFiles parsedOutput;
57+
runcpp2::Data::ProfilesProcessPaths parsedOutput;
5858
nodeRef = outputTree.rootref();
5959
parsedOutput.ParseYAML_Node(nodeRef);
6060
);
6161

6262
ssTEST_OUTPUT_ASSERT( "Parsed output should equal original",
63-
profilesCompilesFiles.Equals(parsedOutput));
63+
profilesProcessPaths.Equals(parsedOutput));
6464
};
6565

6666
ssTEST_END_TEST_GROUP();

Src/Tests/Data/ScriptInfoTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ int main(int argc, char** argv)
157157
ssTEST_OUTPUT_SETUP
158158
(
159159
const std::vector<ghc::filesystem::path>& msvcCompileFiles =
160-
scriptInfo.OtherFilesToBeCompiled.at("Windows").CompilesFiles.at("MSVC");
160+
scriptInfo.OtherFilesToBeCompiled.at("Windows").Paths.at("MSVC");
161161
);
162162
ssTEST_OUTPUT_ASSERT("MSVC files count", msvcCompileFiles.size() == 2);
163163
ssTEST_OUTPUT_ASSERT("MSVC first file", msvcCompileFiles.at(0) == "src/extra.cpp");
@@ -166,7 +166,7 @@ int main(int argc, char** argv)
166166
ssTEST_OUTPUT_SETUP
167167
(
168168
const std::vector<ghc::filesystem::path>& msvcIncludeFiles =
169-
scriptInfo.IncludePaths.at("Windows").CompilesFiles.at("MSVC");
169+
scriptInfo.IncludePaths.at("Windows").Paths.at("MSVC");
170170
);
171171
ssTEST_OUTPUT_ASSERT("IncludePaths count", msvcIncludeFiles.size() == 1);
172172
ssTEST_OUTPUT_ASSERT("IncludePaths first path", msvcIncludeFiles.at(0) == "include");

Src/Tests/RunAllTests.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ CALL :RUN_TEST "%~dp0\%MODE%FlagsOverrideInfoTest.exe"
4343
CALL :RUN_TEST "%~dp0\%MODE%DependencySourceTest.exe"
4444
CALL :RUN_TEST "%~dp0\%MODE%ProfilesCommandsTest.exe"
4545
CALL :RUN_TEST "%~dp0\%MODE%FilesToCopyInfoTest.exe"
46-
CALL :RUN_TEST "%~dp0\%MODE%ProfilesCompilesFilesTest.exe"
46+
CALL :RUN_TEST "%~dp0\%MODE%ProfilesProcessPathsTest.exe"
4747
CALL :RUN_TEST "%~dp0\%MODE%ProfilesDefinesTest.exe"
4848
CALL :RUN_TEST "%~dp0\%MODE%DependencyLinkPropertyTest.exe"
4949
CALL :RUN_TEST "%~dp0\%MODE%FilesTypesInfoTest.exe"

Src/Tests/RunAllTests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ runTest ./FlagsOverrideInfoTest
1919
runTest ./DependencySourceTest
2020
runTest ./ProfilesCommandsTest
2121
runTest ./FilesToCopyInfoTest
22-
runTest ./ProfilesCompilesFilesTest
22+
runTest ./ProfilesProcessPathsTest
2323
runTest ./ProfilesDefinesTest
2424
runTest ./DependencyLinkPropertyTest
2525
runTest ./FilesTypesInfoTest

Src/runcpp2/Data/ProfilesCompilesFiles.cpp renamed to Src/runcpp2/Data/ProfilesProcessPaths.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
#include "runcpp2/Data/ProfilesCompilesFiles.hpp"
1+
#include "runcpp2/Data/ProfilesProcessPaths.hpp"
22
#include "runcpp2/ParseUtil.hpp"
33
#include "ssLogger/ssLog.hpp"
44

5-
bool runcpp2::Data::ProfilesCompilesFiles::ParseYAML_Node(ryml::ConstNodeRef& node)
5+
bool runcpp2::Data::ProfilesProcessPaths::ParseYAML_Node(ryml::ConstNodeRef& node)
66
{
77
ssLOG_FUNC_DEBUG();
88

99
INTERNAL_RUNCPP2_SAFE_START();
1010

1111
if(!node.is_map())
1212
{
13-
ssLOG_ERROR("ProfilesCompilesFiles: Not a map type");
13+
ssLOG_ERROR("ProfilesProcessPaths: Not a map type");
1414
return false;
1515
}
1616

1717
for(int i = 0; i < node.num_children(); ++i)
1818
{
1919
if(!INTERNAL_RUNCPP2_BIT_CONTANTS(node[i].type().type, ryml::NodeType_e::SEQ))
2020
{
21-
ssLOG_ERROR("ProfilesCompilesFiles: CompileFiles type requires a list");
21+
ssLOG_ERROR("ProfilesProcessPaths: Paths type requires a list");
2222
return false;
2323
}
2424

2525
ryml::ConstNodeRef currentProfilePathsNode = node[i];
2626
ProfileName profile = GetKey(currentProfilePathsNode);
2727

2828
for(int j = 0; j < currentProfilePathsNode.num_children(); ++j)
29-
CompilesFiles[profile].push_back(GetValue(currentProfilePathsNode[j]));
29+
Paths[profile].push_back(GetValue(currentProfilePathsNode[j]));
3030
}
3131

3232
return true;
3333

3434
INTERNAL_RUNCPP2_SAFE_CATCH_RETURN(false);
3535
}
3636

37-
std::string runcpp2::Data::ProfilesCompilesFiles::ToString(std::string indentation) const
37+
std::string runcpp2::Data::ProfilesProcessPaths::ToString(std::string indentation) const
3838
{
3939
std::string out;
4040

41-
if(CompilesFiles.empty())
41+
if(Paths.empty())
4242
return out;
4343

44-
for(auto it = CompilesFiles.begin(); it != CompilesFiles.end(); ++it)
44+
for(auto it = Paths.begin(); it != Paths.end(); ++it)
4545
{
4646
if(it->second.empty())
4747
out += indentation + it->first + ": []\n";
@@ -56,14 +56,14 @@ std::string runcpp2::Data::ProfilesCompilesFiles::ToString(std::string indentati
5656
return out;
5757
}
5858

59-
bool runcpp2::Data::ProfilesCompilesFiles::Equals(const ProfilesCompilesFiles& other) const
59+
bool runcpp2::Data::ProfilesProcessPaths::Equals(const ProfilesProcessPaths& other) const
6060
{
61-
if(CompilesFiles.size() != other.CompilesFiles.size())
61+
if(Paths.size() != other.Paths.size())
6262
return false;
6363

64-
for(const auto& it : CompilesFiles)
64+
for(const auto& it : Paths)
6565
{
66-
if(other.CompilesFiles.count(it.first) == 0 || other.CompilesFiles.at(it.first) != it.second)
66+
if(other.Paths.count(it.first) == 0 || other.Paths.at(it.first) != it.second)
6767
return false;
6868
}
6969

Src/runcpp2/Data/ScriptInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ bool runcpp2::Data::ScriptInfo::ParseYAML_Node(ryml::ConstNodeRef& node)
115115
{
116116
for(int i = 0; i < node["OtherFilesToBeCompiled"].num_children(); ++i)
117117
{
118-
ProfilesCompilesFiles compilesFiles;
118+
ProfilesProcessPaths compilesFiles;
119119
ryml::ConstNodeRef currentProfileMapNode = node["OtherFilesToBeCompiled"][i];
120120
PlatformName platform = GetKey(currentProfileMapNode);
121121

@@ -132,7 +132,7 @@ bool runcpp2::Data::ScriptInfo::ParseYAML_Node(ryml::ConstNodeRef& node)
132132
{
133133
for(int i = 0; i < node["IncludePaths"].num_children(); ++i)
134134
{
135-
ProfilesCompilesFiles includePaths;
135+
ProfilesProcessPaths includePaths;
136136
ryml::ConstNodeRef currentProfileMapNode = node["IncludePaths"][i];
137137
PlatformName platform = GetKey(currentProfileMapNode);
138138

0 commit comments

Comments
 (0)