diff --git a/gui/ConfigHelper.h b/gui/ConfigHelper.h index 0ff7628..6a79887 100644 --- a/gui/ConfigHelper.h +++ b/gui/ConfigHelper.h @@ -2,6 +2,8 @@ #define GUI_CONFIGHELPER_H #include +#include +#include #include "DriverHelper.h" namespace ConfigHelper { diff --git a/gui/CustomCurve.cpp b/gui/CustomCurve.cpp index 9793684..66949f6 100644 --- a/gui/CustomCurve.cpp +++ b/gui/CustomCurve.cpp @@ -1,6 +1,8 @@ #include "CustomCurve.h" #include +#include +#include #include #include "DriverHelper.h" diff --git a/gui/Makefile b/gui/Makefile index a8bcafa..6080be7 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -1,6 +1,14 @@ # Define the compiler and flags -CXX = g++ +CXX ?= g++ CXXFLAGS = -std=c++17 -I . -isystem External + +# ImPlot has few of these +IMGUIFLAGS = -Wformat=0 -Wno-format-security +ifneq (,$(findstring clang,$(CXX))) + # ImGui produces many of these + IMGUIFLAGS += -Wno-nontrivial-memcall +endif + WARNFLAGS = -Wall -Wno-sign-compare OPTIMIZATION_FLAGS = -O2 -flto=auto DEBUG_FLAGS = -g -O0 @@ -45,7 +53,7 @@ $(TARGET): $(OBJECTS) # Rule to build the object files for ImGui source files External/ImGui/%.o: External/ImGui/%.cpp - $(CXX) $(CXXFLAGS) $(GLFW_CFLAGS) $(OPTIMIZATION_FLAGS) -c $< -o $@ + $(CXX) $(CXXFLAGS) $(GLFW_CFLAGS) $(OPTIMIZATION_FLAGS) $(IMGUIFLAGS) -c $< -o $@ .PHONY: all check_deps clean clean-all debug