Make use of crashdump service optional

This service isn't currently in upstream OpenBMC, so let's turn it off
by default and avoid the "failed to start Crashdump" errors it produces.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I41bda78ce3d89149feb9f721b4900166413317ea
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 781209b..c05e5c4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,7 @@
 
 option (YOCTO "Enable Building in Yocto" OFF)
 option (LIBPECI "Enable use of old peci driver API via libpeci" OFF)
+option (CRASHDUMP "Enable use of the Intel Crashdump service" OFF)
 
 if (LIBPECI AND NOT YOCTO)
     add_dependencies (host-error-monitor libpeci)
@@ -59,6 +60,10 @@
     target_link_libraries (host-error-monitor peci)
 endif ()
 
+if (CRASHDUMP)
+    add_definitions (-DCRASHDUMP)
+endif ()
+
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-rtti")