[physfs] [PATCH] Mark readline.h and history.h as SYSTEM libraries so that GCC ignores warnings for those libs

Tobias Markus tobbi at supertuxproject.org
Wed Sep 6 15:43:42 EDT 2017


Hello,

we have applied the attached patch to our clone of PhysFS in order to 
fix compilation with newer GCC versions. From the CMake docs:

"If the |SYSTEM| option is given, the compiler will be told the 
directories are meant as system include directories on some platforms. 
Signalling this setting might achieve effects such as the compiler 
skipping warnings, or these fixed-install system files not being 
considered in dependency calculations - see compiler docs."


--Tobias Markus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/physfs/attachments/20170906/0c2e230c/attachment.html>
-------------- next part --------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad1441b..83c4541 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -204,7 +204,7 @@ if(PHYSFS_BUILD_TEST)
         if(READLINE_LIBRARY)
             set(HAVE_SYSTEM_READLINE TRUE)
             set(TEST_PHYSFS_LIBS ${TEST_PHYSFS_LIBS} ${READLINE_LIBRARY} ${CURSES_LIBRARY})
-            include_directories(${READLINE_H} ${HISTORY_H})
+            include_directories(SYSTEM ${READLINE_H} ${HISTORY_H})
             add_definitions(-DPHYSFS_HAVE_READLINE=1)
         endif()
     endif()


More information about the physfs mailing list