Added basic command line arguments parsing + added build/* to gitignore + renamed CMake executable from main to BPE

This commit is contained in:
2026-09-23 15:35:57 +02:00
parent 9e8858aec1
commit 694eeea800
4 changed files with 20 additions and 43 deletions
+1 -34
View File
@@ -1,34 +1 @@
# ---> C++
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
build/*
+1 -1
View File
@@ -4,6 +4,6 @@ project(SwaggGPT LANGUAGES CXX)
set(CMAKE_CXX_FLAGS "-O3")
add_executable(main src/main.cpp)
add_executable(BPE src/bpe.cpp)
include_directories(include)
+18
View File
@@ -0,0 +1,18 @@
#include <iostream>
int main(int argc, char *argv[]) {
// Check for right number of arguments (2 arguments)
if (argc != 3) {
std::cout << "Syntax: BPE path/to/vocabulary path/to/corpus\n";
return 1;
}
std::string vocabularyPath(argv[1]);
std::string corpusPath(argv[2]);
return 0;
}
-8
View File
@@ -1,8 +0,0 @@
#include <iostream>
int main() {
std::cout << "hello world !\n";
return 0;
}