diff options
-rw-r--r-- | slicer/test/conversions.cpp | 1 | ||||
-rw-r--r-- | slicer/test/types.ice | 2 | ||||
-rw-r--r-- | slicer/tool/parser.cpp | 8 |
3 files changed, 9 insertions, 2 deletions
diff --git a/slicer/test/conversions.cpp b/slicer/test/conversions.cpp index aaad378..9f79f2e 100644 --- a/slicer/test/conversions.cpp +++ b/slicer/test/conversions.cpp @@ -1,5 +1,6 @@ #include "types.h" #include <boost/numeric/conversion/cast.hpp> +#include <visibility.h> #define SHORT(x) boost::numeric_cast< ::Ice::Short , int64_t >(x) diff --git a/slicer/test/types.ice b/slicer/test/types.ice index 311d210..e7811d0 100644 --- a/slicer/test/types.ice +++ b/slicer/test/types.ice @@ -1,10 +1,10 @@ [["cpp:include:boost/date_time/posix_time/posix_time_types.hpp"]] [["cpp:include:boost/date_time/posix_time/time_formatters.hpp"]] [["cpp:include:boost/date_time/posix_time/time_parsers.hpp"]] -[["cpp:include:conversions.h"]] #include <included.ice> +["slicer:include:conversions.h"] module TestModule { enum SomeNumbers { One = 1, Ten = 10, FiftyFive = 55 diff --git a/slicer/tool/parser.cpp b/slicer/tool/parser.cpp index ca190a5..56fe4cd 100644 --- a/slicer/tool/parser.cpp +++ b/slicer/tool/parser.cpp @@ -120,7 +120,13 @@ namespace Slicer { fprintbf(cpp, "// Begin Slicer code\n\n"); fprintbf(cpp, "#include <%s>\n\n", fs::change_extension(topLevelFile.filename(), ".h").string()); fprintbf(cpp, "#include <%s>\n", (headerPrefix / "modelPartsTypes.impl.h").string()); - fprintbf(cpp, "#include <%s>\n\n", (headerPrefix / "common.h").string()); + fprintbf(cpp, "#include <%s>\n", (headerPrefix / "common.h").string()); + for (const auto & m : u->modules()) { + for (const auto & i : metaDataValues("slicer:include:", m->getMetaData())) { + fprintbf(cpp, "#include <%s>\n", i); + } + } + fprintbf(cpp, "\n"); fprintbf(cpp, "namespace Slicer {\n"); return true; } |