Fix building as shared library with MSVC.

This commit is contained in:
Dimitrij Mijoski
2022-09-17 14:58:52 +02:00
committed by Martin Hořeňovský
parent 0de60d8e7e
commit c0e582e659
6 changed files with 22 additions and 3 deletions

View File

@@ -382,5 +382,15 @@
# define CATCH_CONFIG_COLOUR_WIN32
#endif
#if defined( CATCH_CONFIG_SHARED_LIBRARY ) && defined( _MSC_VER ) && \
!defined( CATCH_CONFIG_STATIC )
# ifdef Catch2_EXPORTS
# define CATCH_EXPORT //__declspec( dllexport ) // not needed
# else
# define CATCH_EXPORT __declspec( dllimport )
# endif
#else
# define CATCH_EXPORT
#endif
#endif // CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED