Add more compiler checks for GCC

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1255 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
beuc 2012-04-21 16:53:57 +00:00
parent 5c09863775
commit e2f3f6181e

View File

@ -195,6 +195,14 @@ IF(WIN32)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ENDIF() ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic")
IF(!ANDROID)
# not setting -ansi as EGL/KHR headers doesn't support it
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi")
ENDIF()
ENDIF(CMAKE_COMPILER_IS_GNUCC)
if(UNIX AND NOT ANDROID) if(UNIX AND NOT ANDROID)
FIND_PACKAGE(X11 REQUIRED) FIND_PACKAGE(X11 REQUIRED)
LIST(APPEND LIBS ${X11_LIBRARIES}) LIST(APPEND LIBS ${X11_LIBRARIES})