From ff6255810d689b27f9e4a52d865da7c656c5d566 Mon Sep 17 00:00:00 2001 From: jtsiomb Date: Wed, 14 May 2014 18:28:53 +0000 Subject: [PATCH] Compiling with -ansi makes a lot of important POSIX (standard UNIX) facilities unavailable. This was masked until recently by an incorrect conditional in the CMakeLists.txt file, that looked like it would use -ansi on anything other than android, but it didn't actually use it anywhere. As soon as that was fixed, and -ansi started being used, build broke on linux. The intention of the -ansi flag was to help catch portability-reducing mistakes in the code, so instead of removing it completely I used -pedantic in its place, which produces a lot of warnings for not strictly ISO/ANSI compliant code that relies on compiler-specific features. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1681 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freeglut/freeglut/CMakeLists.txt b/freeglut/freeglut/CMakeLists.txt index 6feb753..65fa546 100644 --- a/freeglut/freeglut/CMakeLists.txt +++ b/freeglut/freeglut/CMakeLists.txt @@ -238,7 +238,7 @@ IF(CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") IF(NOT(ANDROID OR BLACKBERRY)) # not setting -ansi as EGL/KHR headers doesn't support it - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic") ENDIF() ENDIF(CMAKE_COMPILER_IS_GNUCC)