aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2020-11-19 09:37:28 +0000
committerGitHub <noreply@github.com>2020-11-19 09:37:28 +0000
commitf54581b9d4837e92cf644b48505e5419d8df72cb (patch)
tree6bef3a27f37ecc7422e291028f085e61740644aa /CMakeLists.txt
parent58b89f9e0f7cd7847606fb22d2c0b9a38735cd62 (diff)
downloadlibvfio-user-f54581b9d4837e92cf644b48505e5419d8df72cb.zip
libvfio-user-f54581b9d4837e92cf644b48505e5419d8df72cb.tar.gz
libvfio-user-f54581b9d4837e92cf644b48505e5419d8df72cb.tar.bz2
enable assert() in release builds (#98)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8eae4a..ff54c89 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,9 +32,16 @@ cmake_minimum_required (VERSION 2.6)
project(muser)
include(GNUInstallDirs)
+set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb")
+#
+# NB: this intentionally does not define NDEBUG: we want our assert()s even in a
+# release build.
+#
+set(CMAKE_C_FLAGS_RELEASE "-O3")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra")
+
# shared libraries
add_subdirectory(lib)