From 323957de8fd714ca523b8ff45dbb711da09d6693 Mon Sep 17 00:00:00 2001 From: Sylvain Beucler Date: Sat, 21 Apr 2012 16:53:57 +0000 Subject: [PATCH] Add more compiler checks for GCC git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1255 7f0cb862-5218-0410-a997-914c9d46530a --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b5e1920..828b7b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -195,6 +195,14 @@ IF(WIN32) ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) 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) FIND_PACKAGE(X11 REQUIRED) LIST(APPEND LIBS ${X11_LIBRARIES}) -- 1.7.10.4