summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-04-27 20:28:31 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2020-04-27 20:28:31 +0100
commit984fc18cb1262d401960b1435d7508c19aad85c3 (patch)
tree68e915e526097f9a070214461fccfe8bf588a6d4
parentRemvoe some duplication in class registration (diff)
downloadslicer-984fc18cb1262d401960b1435d7508c19aad85c3.tar.bz2
slicer-984fc18cb1262d401960b1435d7508c19aad85c3.tar.xz
slicer-984fc18cb1262d401960b1435d7508c19aad85c3.zip
Add not the worst hack to get linking to work on GCC and Clang
-rw-r--r--slicer/slicer/modelPartsTypes.impl.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h
index ebcceac..872304b 100644
--- a/slicer/slicer/modelPartsTypes.impl.h
+++ b/slicer/slicer/modelPartsTypes.impl.h
@@ -12,6 +12,12 @@
#include <boost/multi_index/member.hpp>
#include <boost/algorithm/string/case_conv.hpp>
+#ifdef __clang__
+#define FINALVISMODELPARTS DLL_PUBLIC
+#else
+#define FINALVISMODELPARTS
+#endif
+
#define CUSTOMMODELPARTFOR(Type, BaseModelPart, ModelPartType) \
template<> DLL_PUBLIC ModelPartPtr ModelPart::CreateFor<Type>() { return std::make_shared<ModelPartType>(nullptr); } \
template<> DLL_PUBLIC ModelPartPtr ModelPart::CreateFor(Type & s) { return std::make_shared<ModelPartType>(&s); } \
@@ -22,7 +28,7 @@
template<> DLL_PUBLIC ModelPartForRootPtr ModelPart::CreateRootFor(Ice::optional<Type> & s) { return std::make_shared<ModelPartForRoot<Ice::optional<Type>>>(&s); } \
template<> DLL_PUBLIC ModelPartForRootPtr ModelPart::CreateRootFor(const Type & s) { return CreateRootFor(const_cast<Type &>(s)); } \
template<> DLL_PUBLIC ModelPartForRootPtr ModelPart::CreateRootFor(const Ice::optional<Type> & s) { return CreateRootFor(const_cast<Ice::optional<Type> &>(s)); } \
- template class BaseModelPart; \
+ template class FINALVISMODELPARTS BaseModelPart; \
template class ModelPartForRoot<Type>; \
template class ModelPartForRoot< Ice::optional<Type> >; \