diff --git a/CPPWebFramework/UnitTests.pro b/CPPWebFramework/UnitTests.pro index ed9c054..5f0c2b7 100644 --- a/CPPWebFramework/UnitTests.pro +++ b/CPPWebFramework/UnitTests.pro @@ -137,6 +137,7 @@ HEADERS += \ tests/tst_cstlcompilerout.h \ cwf/sslloader.h +DEFINES += CPPWEBFRAMEWORK_TEST QMAKE_CXXFLAGS += -g -Wall -fprofile-arcs -ftest-coverage -O0 QMAKE_LFLAGS += -g -Wall -fprofile-arcs -ftest-coverage -O0 LIBS += -lgcov diff --git a/CPPWebFramework/cwf/cppwebframework_global.h b/CPPWebFramework/cwf/cppwebframework_global.h index f6561b3..0e81c5c 100644 --- a/CPPWebFramework/cwf/cppwebframework_global.h +++ b/CPPWebFramework/cwf/cppwebframework_global.h @@ -10,7 +10,9 @@ #include -#if defined(CPPWEBFRAMEWORK_LIBRARY) +#if defined(CPPWEBFRAMEWORK_TEST) +# define CPPWEBFRAMEWORKSHARED_EXPORT +#elif defined(CPPWEBFRAMEWORK_LIBRARY) # define CPPWEBFRAMEWORKSHARED_EXPORT Q_DECL_EXPORT #else # define CPPWEBFRAMEWORKSHARED_EXPORT Q_DECL_IMPORT