Skip to content

Commit

Permalink
sccache stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
lsproule committed Dec 9, 2023
1 parent b2b9633 commit 82eace3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/Frate/Command.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ namespace Frate::Command {

//TODO: MAKE MOST OF THESE OPTIONAL
typedef struct Project_s {

std::string project_name;
std::string project_description;
std::string project_type = ProjectType::EXECUTABLE;
Expand Down Expand Up @@ -141,6 +140,7 @@ namespace Frate::Command {
std::string project_version{"0.0.1"};
std::vector<std::string> flags;
std::vector<std::string> toolchains {};
std::vector<std::string> libs{};
void fromJson(json j);
nlohmann::json toJson();
bool save();
Expand Down
8 changes: 8 additions & 0 deletions include/Frate/Command/Library.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#pragma once
#include <Frate/Command.hpp>

namespace Frate::Command::Library{
bool add(Interface* inter, std::string link);
bool remove(Interface* inter, std::string link);
bool list(Interface* inter);
}
10 changes: 10 additions & 0 deletions src/Command/Library/list.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <Frate/Command/Library.hpp>

namespace Frate::Command::Library{
bool list(Interface* inter){
for(auto& lib : inter->pro->libs){
std::cout << lib << std::endl;
}
return true;
}
}
10 changes: 10 additions & 0 deletions src/Command/Library/remove.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <Frate/Command/Library.hpp>

namespace Frate::Command::Library{
bool remove(Interface* inter, std::string link){
std::erase_if(inter->pro->libs, [&](std::string& lib){
return lib == link;
});
return inter->pro->save();
}
}

0 comments on commit 82eace3

Please sign in to comment.