Disable crashdump for SMI Timeout with an option to enable

When debugging with JTAG, if the host is halted while the SMI
pin is asserted, the BMC will detect that as an SMI timeout and
trigger a crashdump.  For debug with a reference platform, this
is not desired, so disable crashdump for SMI timeout but provide
an option to enable it.

Tested:
Halted with SMI asserted and confirmed that the error is logged
but no crashdump is triggered.

Built with the option enabled and confirmed that crashdump is
triggered as expected.

Change-Id: I27dbbc6c9114b5c65c33ea7de8b6e234313d4736
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 43f9510..e7da2fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,13 @@
 
 add_executable (host-error-monitor src/host_error_monitor.cpp)
 
+option (HOST_ERROR_CRASHDUMP_ON_SMI_TIMEOUT "Enable crashdump on SMI Timeout."
+        OFF)
+
+target_compile_definitions (host-error-monitor PRIVATE
+                            $<$<BOOL:${HOST_ERROR_CRASHDUMP_ON_SMI_TIMEOUT}>:
+                            -DHOST_ERROR_CRASHDUMP_ON_SMI_TIMEOUT>)
+
 target_include_directories (host-error-monitor PRIVATE ${CMAKE_SOURCE_DIR})
 
 target_link_libraries (host-error-monitor sdbusplus -lsystemd gpiodcxx peci)