From bc546d05a93794b1f0f1ef02e96f918533c250c3 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 13 Aug 2014 09:44:30 +0200 Subject: Define _GNU_SOURCE on one place only. There were several _GNU_SOURCE definitions scaterred in the build system. This patch always adds -D_GNU_SOURCE to the CFLAGS if building on a UNIX platform. Signed-off-by: Jakub Hrozek Reviewed-by: Andreas Schneider Reviewed-by: Michael Adam --- cmake/Modules/DefineCompilerFlags.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'cmake/Modules') diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake index 218f4fe..28f4796 100644 --- a/cmake/Modules/DefineCompilerFlags.cmake +++ b/cmake/Modules/DefineCompilerFlags.cmake @@ -19,6 +19,7 @@ if (UNIX AND NOT WIN32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=pointer-arith -Werror=declaration-after-statement") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration -Werror=write-strings") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE") # with -fPIC check_c_compiler_flag("-fPIC" WITH_FPIC) -- cgit