[CMAKE] Define _GNU_SOURCE on CMakeLists.txt

The latest elfutils-libelf headers won't compile without _LARGEFILE64_SOURCE
(that is implied by _GNU_SOURCE).

Some .c files don't have a #define _GNU_SOURCE line. Instead of adding the line
to all .c files, define it globally on CMakeLists.txt.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
This commit is contained in:
Eduardo Habkost 2007-10-26 13:21:31 -02:00 committed by Arnaldo Carvalho de Melo
parent 60737d18e3
commit 15c6f261b6
4 changed files with 1 additions and 3 deletions

View File

@ -23,6 +23,7 @@ if (NOT CMAKE_BUILD_TYPE)
FORCE)
endif (NOT CMAKE_BUILD_TYPE)
add_definitions(-D_GNU_SOURCE)
find_package(DWARF REQUIRED)
_set_fancy(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${__LIB}" "libdir")

View File

@ -9,7 +9,6 @@
published by the Free Software Foundation.
*/
#define _GNU_SOURCE
#include <assert.h>
#include <dirent.h>
#include <dwarf.h>

View File

@ -6,7 +6,6 @@
* by the Free Software Foundation.
*/
#define _GNU_SOURCE
#include <argp.h>
#include <malloc.h>
#include <search.h>

View File

@ -8,7 +8,6 @@
published by the Free Software Foundation.
*/
#define _GNU_SOURCE
#include <argp.h>
#include <assert.h>
#include <stdio.h>