Description: Define NDEBUG to disable debug output
 Cherry-pick defining NDEBUG from upstream commit
 5fa7eeb9a3df65452970566abc027db566012caf to disable debug output
Bug-Debian: https://bugs.debian.org/822727
Bug-Ubuntu: https://launchpad.net/bugs/1649224

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 406e826..0450ab2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -174,6 +174,10 @@ if (BUILD_SHARED_LIBS)
   endif ()
 endif ()
 
+if (CMAKE_BUILD_TYPE STREQUAL "None") # As used by some distros.
+  add_definitions (-DNDEBUG)
+endif ()
+
 
 
 # Installation configuration:
