jrl-umi3218 / jrl-cmakemodules

CMake utility toolbox
https://jrl-cmakemodules.readthedocs.io/en/master/
Other
59 stars 45 forks source link

Add a macro to do explicit template instantiation on Windows/MacOS/Linux #652

Closed jorisv closed 8 months ago

jorisv commented 8 months ago

Explicit template instantiation is done with the extern template keyword.

Unfortunately, when used with dllexport on Windows this create a warning message.

To avoid that, we define @LIBRARY_NAME@_EXP_INST_DECL that manage the compiler and the import/export context to avoid warnings.