mason/src/main.cpp

30 lines
648 B
C++
Raw Normal View History

2023-08-27 17:55:04 +00:00
#include <iostream>
2023-08-30 20:54:59 +00:00
#include <string>
#include "project.h"
2023-08-27 17:55:04 +00:00
int main(int argc, char *argv[]) {
2023-08-30 20:54:59 +00:00
std::string firstArg;
if (argc > 1)
firstArg = argv[1];
else
firstArg = "./";
Project root(firstArg);
bool success = root.read();
if (!success) {
Project::Log log(root.getLog());
for (const Project::LogMessage& msg : log)
std::cout << msg << std::endl;
return -1;
} else {
std::cout << "successfully parsed project " << root.getName() << std::endl;
2023-08-31 20:06:02 +00:00
std::cout << "dependencies count is " << root.dependenciesCount() << std::endl;
2023-08-30 20:54:59 +00:00
}
2023-08-27 17:55:04 +00:00
return 0;
}