Init cpp impl
This commit is contained in:
parent
ba1cc1f294
commit
8672efe385
5 changed files with 47 additions and 0 deletions
3
cpp_impl/.gitignore
vendored
Normal file
3
cpp_impl/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
GreedyTextJustification
|
||||||
|
src/*.o
|
||||||
|
compile_commands.json
|
21
cpp_impl/Makefile
Normal file
21
cpp_impl/Makefile
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
COMMON_FLAGS = -Wall -Wextra -Wpedantic
|
||||||
|
ifdef DEBUG
|
||||||
|
CXXFLAGS = $(COMMON_FLAGS) -O0 -g
|
||||||
|
else
|
||||||
|
CXXFLAGS = $(COMMON_FLAGS) -O3 -DNDEBUG
|
||||||
|
endif
|
||||||
|
|
||||||
|
OBJECTS = \
|
||||||
|
src/main.o \
|
||||||
|
src/argparse.o
|
||||||
|
|
||||||
|
all: GreedyTextJustification
|
||||||
|
|
||||||
|
GreedyTextJustification: $(OBJECTS)
|
||||||
|
$(CXX) $(CXXFLAGS) -o GreedyTextJustification $^
|
||||||
|
|
||||||
|
.PHONY:
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f GreedyTextJustification
|
||||||
|
rm -f src/*.o
|
7
cpp_impl/src/argparse.cpp
Normal file
7
cpp_impl/src/argparse.cpp
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#include "argparse.hpp"
|
||||||
|
|
||||||
|
std::unordered_map<std::string, std::string> ArgParse::parseArgs(int argc, char **argv) {
|
||||||
|
std::unordered_map<std::string, std::string> mapping;
|
||||||
|
|
||||||
|
return mapping;
|
||||||
|
}
|
11
cpp_impl/src/argparse.hpp
Normal file
11
cpp_impl/src/argparse.hpp
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#ifndef GREEDY_TEXT_JUSTIFICATION_ARG_PARSE_HPP
|
||||||
|
#define GREEDY_TEXT_JUSTIFICATION_ARG_PARSE_HPP
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
|
namespace ArgParse {
|
||||||
|
std::unordered_map<std::string, std::string> parseArgs(int argc, char **argv);
|
||||||
|
} // namespace ArgParse
|
||||||
|
|
||||||
|
#endif
|
5
cpp_impl/src/main.cpp
Normal file
5
cpp_impl/src/main.cpp
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in a new issue