From 984fc18cb1262d401960b1435d7508c19aad85c3 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 27 Apr 2020 20:28:31 +0100 Subject: Add not the worst hack to get linking to work on GCC and Clang --- slicer/slicer/modelPartsTypes.impl.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 #include +#ifdef __clang__ +#define FINALVISMODELPARTS DLL_PUBLIC +#else +#define FINALVISMODELPARTS +#endif + #define CUSTOMMODELPARTFOR(Type, BaseModelPart, ModelPartType) \ template<> DLL_PUBLIC ModelPartPtr ModelPart::CreateFor() { return std::make_shared(nullptr); } \ template<> DLL_PUBLIC ModelPartPtr ModelPart::CreateFor(Type & s) { return std::make_shared(&s); } \ @@ -22,7 +28,7 @@ template<> DLL_PUBLIC ModelPartForRootPtr ModelPart::CreateRootFor(Ice::optional & s) { return std::make_shared>>(&s); } \ template<> DLL_PUBLIC ModelPartForRootPtr ModelPart::CreateRootFor(const Type & s) { return CreateRootFor(const_cast(s)); } \ template<> DLL_PUBLIC ModelPartForRootPtr ModelPart::CreateRootFor(const Ice::optional & s) { return CreateRootFor(const_cast &>(s)); } \ - template class BaseModelPart; \ + template class FINALVISMODELPARTS BaseModelPart; \ template class ModelPartForRoot; \ template class ModelPartForRoot< Ice::optional >; \ -- cgit v1.2.3