Skip to content

Commit

Permalink
Add compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Jul 30, 2023
1 parent b6a8d7d commit 3eca58f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ target_compile_definitions(ImGui-SFML
IMGUI_USER_CONFIG="${IMGUI_SFML_CONFIG_NAME}"
)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
target_compile_options(ImGui-SFML PRIVATE -Werror -Wall -Wextra -Wpedantic -Wshadow)
endif()

if(WIN32 AND MINGW)
target_link_libraries(ImGui-SFML PUBLIC imm32)
endif()
Expand Down
4 changes: 4 additions & 0 deletions imgui-SFML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#include <memory>
#include <vector>

#if defined(__APPLE__)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif

#if SFML_VERSION_MAJOR >= 3
#define IMGUI_SFML_KEY_APOSTROPHE sf::Keyboard::Apostrophe
#define IMGUI_SFML_KEY_GRAVE sf::Keyboard::Grave
Expand Down

0 comments on commit 3eca58f

Please sign in to comment.