Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning lvl 4 errors + fix g++ compile error #3

Merged
merged 1 commit into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.sln
*.vcxproj
*.vcxproj.*
Makefile

# Output
bin/
Expand Down
1 change: 1 addition & 0 deletions GenerateProject.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./premake5 gmake2
11 changes: 4 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions logtools/src/logtools.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -180,4 +180,4 @@ class Logger
#endif
};

#endif INCLUDE_LOGTOOLS_H
#endif //INCLUDE_LOGTOOLS_H
9 changes: 8 additions & 1 deletion premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ project "logtools"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"


warnings "extra"

targetdir ("bin/" .. outputdir)
objdir ("bin-int/" .. outputdir)

Expand All @@ -26,6 +28,11 @@ project "logtools"
"%{prj.name}/src/**.cpp"
}

flags
{
"FatalWarnings"
}

filter "configurations:Debug"
runtime "Debug"
symbols "on"
Expand Down