diff --git a/.gitignore b/.gitignore index e9c9533..ffe9bea 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.sln *.vcxproj *.vcxproj.* +Makefile # Output bin/ diff --git a/GenerateProject.sh b/GenerateProject.sh new file mode 100644 index 0000000..1014fac --- /dev/null +++ b/GenerateProject.sh @@ -0,0 +1 @@ +./premake5 gmake2 diff --git a/build.sh b/build.sh index d22714c..c870d21 100755 --- a/build.sh +++ b/build.sh @@ -1,14 +1,11 @@ # To build: simply call ./build.sh -# To also run when build completed pass the flag `-r` or `--run` - -# Make build folder -mkdir -p ./bin +# To also run when build completed pass the flag `-r` # Compile -g++ -std=c++17 ./logtools/src/main.cpp -o ./bin/program.o +make # Run if requested -if echo $* | grep -e "--run" -q +if echo $* | grep -e "-r" -q then - ./bin/program.o + ./bin/Debug-x86_64-linux/logtools fi diff --git a/logtools/src/logtools.h b/logtools/src/logtools.h index 505fa49..ab2049c 100644 --- a/logtools/src/logtools.h +++ b/logtools/src/logtools.h @@ -160,7 +160,7 @@ class Logger { SetConsoleTextAttribute(Instance().hConsole, RESET); } - static void LogColor(const std::string& msg, const int color) + static void LogColor(const std::string& msg, const WORD color) { SetConsoleTextAttribute(Instance().hConsole, color); std::cout << msg << std::endl; @@ -180,4 +180,4 @@ class Logger #endif }; -#endif INCLUDE_LOGTOOLS_H +#endif //INCLUDE_LOGTOOLS_H diff --git a/premake5.lua b/premake5.lua index dcae168..7fdcc6b 100644 --- a/premake5.lua +++ b/premake5.lua @@ -16,7 +16,9 @@ project "logtools" kind "ConsoleApp" language "C++" cppdialect "C++17" - + + warnings "extra" + targetdir ("bin/" .. outputdir) objdir ("bin-int/" .. outputdir) @@ -26,6 +28,11 @@ project "logtools" "%{prj.name}/src/**.cpp" } + flags + { + "FatalWarnings" + } + filter "configurations:Debug" runtime "Debug" symbols "on"