aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-03-23 15:56:59 +0000
committerGitHub <noreply@github.com>2021-03-23 15:56:59 +0000
commitc0c891a19d78ba8881f9bc77013bdfd583e223f2 (patch)
tree0f9df8e72efb22ac027ad91e6898dfb2082bd088 /CMakeLists.txt
parent9ed4c9e8c86ec04cbae067db18e1d31dd5f2ca79 (diff)
downloadlibvfio-user-c0c891a19d78ba8881f9bc77013bdfd583e223f2.zip
libvfio-user-c0c891a19d78ba8881f9bc77013bdfd583e223f2.tar.gz
libvfio-user-c0c891a19d78ba8881f9bc77013bdfd583e223f2.tar.bz2
globally define _GNU_SOURCE (#401)
This avoids any issues with multiple definitions when passing CFLAGS in. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72c2063..8715625 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,7 @@ set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb")
set(CMAKE_C_FLAGS_RELEASE "-O3")
set(CMAKE_C_FLAGS
- "${CMAKE_C_FLAGS} -Wall -Werror -Wextra ")
+ "${CMAKE_C_FLAGS} -D_GNU_SOURCE -Wall -Werror -Wextra")
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -Wno-missing-field-initializers -Wmissing-declarations")