aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJakub Hrozek <jakub.hrozek@gmail.com>2014-08-13 09:44:30 +0200
committerAndreas Schneider <asn@samba.org>2014-08-15 10:53:51 +0200
commitbc546d05a93794b1f0f1ef02e96f918533c250c3 (patch)
treee9a75dbca1fae4bf032b06a1a77247fdd4897ade /cmake
parentbaa8b438f76e66531b26a90c02ab11d4e6c09944 (diff)
downloadsocket_wrapper-bc546d05a93794b1f0f1ef02e96f918533c250c3.tar.gz
socket_wrapper-bc546d05a93794b1f0f1ef02e96f918533c250c3.tar.xz
socket_wrapper-bc546d05a93794b1f0f1ef02e96f918533c250c3.zip
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 <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/DefineCompilerFlags.cmake1
1 files changed, 1 insertions, 0 deletions
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)