From f2089c954ff00a5a3cb8c64a6258f7f5f904254a Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 4 Feb 2023 00:13:02 -0800 Subject: [PATCH] Silence warnings about using `long long` in C++03 We get these warnings because of the typedefs for 64-bit integers in PhysFS's header files. The compiler will treat them as extensions and will still compile it fine but it does mean we aren't strictly standards conforming. Which really isn't a problem anyway. Probably. --- desktop_version/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/desktop_version/CMakeLists.txt b/desktop_version/CMakeLists.txt index 9edcbfbe..6945f5f8 100644 --- a/desktop_version/CMakeLists.txt +++ b/desktop_version/CMakeLists.txt @@ -275,6 +275,13 @@ if(MSVC) target_compile_options(VVVVVV PRIVATE /wd4244) endif() +# Disable warnings about `long long` in C++03 (from including PhysFS) +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + target_compile_options(VVVVVV PRIVATE -Wno-long-long) +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + target_compile_options(VVVVVV PRIVATE -Wno-c++11-long-long) +endif() + if(MSVC) # MSVC doesn't have /std:c99 or /std:c++98 switches!