diff --git a/src/kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.cpp b/src/kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.cpp index e50d95a6..1bf69897 100644 --- a/src/kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.cpp +++ b/src/kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.cpp @@ -18,6 +18,12 @@ #ifdef KALEIDOSCOPE_VIRTUAL_BUILD +#ifdef KALEIDOSCOPE_VIRTUAL_HOST_EVENTS + +#ifndef __linux__ +#error Generating host events is only supported on Linux at the moment. +#endif + #include "kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.h" #include "kaleidoscope/simulator/reports/BootKeyboardReport.h" #include "kaleidoscope/simulator/reports/KeyboardReport.h" @@ -396,4 +402,5 @@ bool GenerateHostEvent::Action::evalInternal() { #error __CLANG_ATOMIC_LLONG_LOCK_FREE #endif +#endif // KALEIDOSCOPE_VIRTUAL_HOST_EVENTS #endif // KALEIDOSCOPE_VIRTUAL_BUILD diff --git a/src/kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.h b/src/kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.h index 9ffbcb01..914d0c43 100644 --- a/src/kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.h +++ b/src/kaleidoscope/simulator/actions/generic_report/GenerateHostEvent.h @@ -19,6 +19,7 @@ #pragma once #ifdef KALEIDOSCOPE_VIRTUAL_BUILD +#ifdef KALEIDOSCOPE_VIRTUAL_HOST_EVENTS #include "kaleidoscope/simulator/interface/actions/generic_report/ReportAction.h" #include "kaleidoscope/simulator/interface/reports/Report_.h" @@ -87,4 +88,5 @@ class GenerateHostEvent { } // namespace simulator } // namespace kaleidoscope +#endif // KALEIDOSCOPE_VIRTUAL_HOST_EVENTS #endif // KALEIDOSCOPE_VIRTUAL_BUILD