SMTK - fatal error: moab/EntityHandle.hpp

Been having this issue for a while with building SMTK against MOAB. We are using MOAB 4.9.0

/opt/dev/cmb-6.0.0-9d95e0c07b6802176294760e36a4ec53043f70a4/thirdparty/smtk/smtk/mesh/moab/HandleRange.h:20:33: fatal error: moab/EntityHandle.hpp: No such file or directory
compilation terminated.
thirdparty/smtk/smtk/CMakeFiles/smtkCore.dir/build.make:1118: recipe for target 'thirdparty/smtk/smtk/CMakeFiles/smtkCore.dir/attribute/json/jsonHelperFunction.cxx.o' failed
make[2]: *** [thirdparty/smtk/smtk/CMakeFiles/smtkCore.dir/attribute/json/jsonHelperFunction.cxx.o] Error 1

Here is the patch I created to fix the issue:

--- cmb-6.0.0/thirdparty/smtk/CMakeLists.txt	2018-07-16 13:49:23.600893737 -0500
+++ cmb-6.0.0-new/thirdparty/smtk/CMakeLists.txt	2018-07-16 13:57:25.116804837 -0500
@@ -263,7 +263,7 @@
 # Moab is required for building smtk::mesh, as it is the default storage
 # format for meshes.
 find_package(MOAB REQUIRED)
-
+include_directories(${MOAB_INCLUDE_DIRS})
 
 ################################################################################
 # Qt Related Settings

Thanks,

Corey

Thanks Corey! I will try this patch out just now.

We are happy taking patch fixes for SMTK/CMB; additionally, we encourage the submission of merge requests to the SMTK and CMB repositories directly. The more external contributors, the better!

It would be better to use target_include_directories for moab (on the smtkCore target) than to use include_directories, which blindly adds moab include dirs to every target.

2 Likes

Sorry for the delay. I have implemented David’s suggestion here. Corey, would you mind testing this to see if it solves your issue?

1 Like

Fixed! Thank you.