changed help

This commit is contained in:
Jorijn van der Graaf 2025-11-03 16:29:18 +01:00
commit 0179e102f5

View file

@ -22,8 +22,16 @@ import std;
using namespace Crafter; using namespace Crafter;
namespace fs = std::filesystem; namespace fs = std::filesystem;
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
if(std::string(argv[1]) == "--help") { if(std::string(argv[1]) == "--help" || std::string(argv[1]) == "help" ) {
std::println("--help\tDisplays this help message.\n-c The name of the configuration to build.\n-p The path to the project file. defualts to project.json\n-o Overrides the output folder.\n-r Runs the executable after building."); std::println("Crafter.Build - A modern build system for C++ projects\n");
std::println("Usage: crafter-build [command] [options]");
std::println("\nCommands:");
std::println(" build\t\tBuild the project");
std::println(" test\t\tRun project tests");
std::println("\nOptions:");
std::println(" --help\tDisplay this help message");
std::println(" -p PATH\tSpecify the project file path (default: project.json)");
std::println(" -r\t\tRun the built executable after building");
return 0; return 0;
} }
if(argc < 2 && std::string(argv[1]) == "build") { if(argc < 2 && std::string(argv[1]) == "build") {