Enum with local includes fails to build
I have a .h file with a scoped enum, and I'm trying to use hoppy to expose it to Haskell. My call looks something like this:
e_requestType :: CppEnum
e_requestType =
addReqIncludes [includeLocal "MyCFile.h"] $
makeAutoEnum (ident2 "namespace" "ClassName" "MyEnum") Nothing Scoped
[ "FOO"
, "BAR"
, "BAZ"
]
However, when I try to generate cpp for this, I get the following error:
/var/folders/9h/sjg5_v_123z99tdvwm8dnh2c0000gp/T/hoppy-enum69793-0.cpp:4:10: fatal error: 'MyCFile.h' file not found
#include "MyCFile.h"
^~~~~~~~~~~
1 error generated.
Error: Hoppy call to program failed ('g++' -o /var/folders/9h/sjg5_v_123z99tdvwm8dnh2c0000gp/T/hoppy-enum69793-1 /var/folders/9h/sjg5_v_123z99tdvwm8dnh2c0000gp/T/hoppy-enum69793-0.cpp).
evaluateEnumsWithCompiler: Failed to build program "/var/folders/9h/sjg5_v_123z99tdvwm8dnh2c0000gp/T/hoppy-enum69793-0.cpp" to evaluate enums with <SimpleCompiler "g++" ["-o","{out}","{in}"]>. Pass --keep-temp-outputs-on-failure to keep build outputs around for debugging.
internalEvaluateEnumsForInterface': Failed to build and run program. Aborting.
It seems like, in order to get underlying numeric info about the enum, this temp file is being generated for the enum definition. However, the temp file seems to have no access to the rest of the C++ source files.
Am I doing something wrong?