diff --git a/src/Magnum/Animation/Player.cpp b/src/Magnum/Animation/Player.cpp index 83f126ec7..4b475c06f 100644 --- a/src/Magnum/Animation/Player.cpp +++ b/src/Magnum/Animation/Player.cpp @@ -44,8 +44,9 @@ Debug& operator<<(Debug& debug, const State value) { } /* On non-MinGW Windows the instantiations are already marked with extern - template */ -#if !defined(CORRADE_TARGET_WINDOWS) || defined(__MINGW32__) + template. However Clang-CL doesn't propagate the export from the extern + template, it seems. */ +#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL) #define MAGNUM_EXPORT_HPP MAGNUM_EXPORT #else #define MAGNUM_EXPORT_HPP diff --git a/src/Magnum/Audio/Listener.cpp b/src/Magnum/Audio/Listener.cpp index 350c67a7d..14ad4a6d1 100644 --- a/src/Magnum/Audio/Listener.cpp +++ b/src/Magnum/Audio/Listener.cpp @@ -110,8 +110,9 @@ template bool Listener::isActive() const { } /* On non-MinGW Windows the instantiations are already marked with extern - template */ -#if !defined(CORRADE_TARGET_WINDOWS) || defined(__MINGW32__) + template. However Clang-CL doesn't propagate the export from the extern + template, it seems. */ +#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL) #define MAGNUM_AUDIO_EXPORT_HPP MAGNUM_AUDIO_EXPORT #else #define MAGNUM_AUDIO_EXPORT_HPP diff --git a/src/Magnum/Audio/Playable.cpp b/src/Magnum/Audio/Playable.cpp index 3a29257d0..33f33f84d 100644 --- a/src/Magnum/Audio/Playable.cpp +++ b/src/Magnum/Audio/Playable.cpp @@ -68,8 +68,9 @@ template void Playable::cleanGain() { } /* On non-MinGW Windows the instantiations are already marked with extern - template */ -#if !defined(CORRADE_TARGET_WINDOWS) || defined(__MINGW32__) + template. However Clang-CL doesn't propagate the export from the extern + template, it seems. */ +#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL) #define MAGNUM_AUDIO_EXPORT_HPP MAGNUM_AUDIO_EXPORT #else #define MAGNUM_AUDIO_EXPORT_HPP diff --git a/src/Magnum/Audio/PlayableGroup.cpp b/src/Magnum/Audio/PlayableGroup.cpp index 805c27bd3..de3934bb9 100644 --- a/src/Magnum/Audio/PlayableGroup.cpp +++ b/src/Magnum/Audio/PlayableGroup.cpp @@ -96,8 +96,9 @@ template void PlayableGroup::setClean() { #endif /* On non-MinGW Windows the instantiations are already marked with extern - template */ -#if !defined(CORRADE_TARGET_WINDOWS) || defined(__MINGW32__) + template. However Clang-CL doesn't propagate the export from the extern + template, it seems. */ +#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL) #define MAGNUM_AUDIO_EXPORT_HPP MAGNUM_AUDIO_EXPORT #else #define MAGNUM_AUDIO_EXPORT_HPP diff --git a/src/Magnum/Math/instantiation.cpp b/src/Magnum/Math/instantiation.cpp index d74280d7a..45f576716 100644 --- a/src/Magnum/Math/instantiation.cpp +++ b/src/Magnum/Math/instantiation.cpp @@ -34,59 +34,67 @@ namespace Corrade { namespace Utility { #ifndef DOXYGEN_GENERATING_OUTPUT -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; - -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; - -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; - -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; - -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; -template struct ConfigurationValue>; +/* Apparently clang-cl doesn't propagate the export from the extern template + declaration or something */ +#ifdef CORRADE_TARGET_CLANG_CL +#define MAGNUM_EXPORT_TEMPLATE MAGNUM_EXPORT +#else +#define MAGNUM_EXPORT_TEMPLATE +#endif + +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; + +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; + +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; + +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; + +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; /* Other (complex, dual complex, quaternion) just reinterpret to 2/4-component vectors instantiated above */ -template struct ConfigurationValue>; -template struct ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; +template struct MAGNUM_EXPORT_TEMPLATE ConfigurationValue>; #endif }} diff --git a/src/Magnum/SceneGraph/instantiation.cpp b/src/Magnum/SceneGraph/instantiation.cpp index b9f43428e..4920bf4dc 100644 --- a/src/Magnum/SceneGraph/instantiation.cpp +++ b/src/Magnum/SceneGraph/instantiation.cpp @@ -42,8 +42,9 @@ namespace Magnum { namespace SceneGraph { /* On non-MinGW Windows the instantiations are already marked with extern - template */ -#if !defined(CORRADE_TARGET_WINDOWS) || defined(__MINGW32__) + template. However Clang-CL doesn't propagate the export from the extern + template, it seems. */ +#if !defined(CORRADE_TARGET_WINDOWS) || defined(CORRADE_TARGET_MINGW) || defined(CORRADE_TARGET_CLANG_CL) #define MAGNUM_SCENEGRAPH_EXPORT_HPP MAGNUM_SCENEGRAPH_EXPORT #else #define MAGNUM_SCENEGRAPH_EXPORT_HPP