2012-06-26 14:37:02 +02:00
set ( TEST_SRCS
s r c / A c t i v e D i s p a t c h e r T e s t . c p p
s r c / A c t i v e M e t h o d T e s t . c p p
s r c / A c t i v i t y T e s t . c p p
s r c / A n y T e s t . c p p
s r c / A r r a y T e s t . c p p
s r c / A u t o P t r T e s t . c p p
s r c / A u t o R e l e a s e P o o l T e s t . c p p
2013-02-19 06:16:12 +01:00
s r c / B a s e 3 2 T e s t . c p p
2012-06-26 14:37:02 +02:00
s r c / B a s e 6 4 T e s t . c p p
s r c / B a s i c E v e n t T e s t . c p p
s r c / B i n a r y R e a d e r W r i t e r T e s t . c p p
s r c / B y t e O r d e r T e s t . c p p
s r c / C a c h e T e s t S u i t e . c p p
s r c / C h a n n e l T e s t . c p p
s r c / C l a s s L o a d e r T e s t . c p p
2013-12-24 09:20:35 +01:00
s r c / C l o c k T e s t . c p p
2012-06-26 14:37:02 +02:00
s r c / C o n d i t i o n T e s t . c p p
s r c / C o r e T e s t . c p p
s r c / C o r e T e s t S u i t e . c p p
s r c / C o u n t i n g S t r e a m T e s t . c p p
s r c / C r y p t T e s t S u i t e . c p p
s r c / D a t e T i m e F o r m a t t e r T e s t . c p p
s r c / D a t e T i m e P a r s e r T e s t . c p p
s r c / D a t e T i m e T e s t . c p p
s r c / D a t e T i m e T e s t S u i t e . c p p
s r c / D i g e s t S t r e a m T e s t . c p p
2013-02-19 21:29:58 +01:00
s r c / D i r e c t o r y I t e r a t o r s T e s t . c p p
2013-02-19 06:16:12 +01:00
s r c / D i r e c t o r y W a t c h e r T e s t . c p p
2012-06-26 14:37:02 +02:00
s r c / D r i v e r . c p p
s r c / D u m m y D e l e g a t e . c p p
s r c / D y n a m i c F a c t o r y T e s t . c p p
s r c / D y n a m i c T e s t S u i t e . c p p
s r c / E v e n t T e s t S u i t e . c p p
s r c / E x p i r e C a c h e T e s t . c p p
s r c / E x p i r e L R U C a c h e T e s t . c p p
s r c / F I F O E v e n t T e s t . c p p
s r c / F I F O B u f f e r S t r e a m T e s t . c p p
s r c / F P E T e s t . c p p
s r c / F i l e C h a n n e l T e s t . c p p
s r c / F i l e S t r e a m T e s t . c p p
s r c / F i l e T e s t . c p p
s r c / F i l e s y s t e m T e s t S u i t e . c p p
s r c / F o r m a t T e s t . c p p
s r c / F o u n d a t i o n T e s t S u i t e . c p p
s r c / G l o b T e s t . c p p
s r c / H M A C E n g i n e T e s t . c p p
s r c / H a s h M a p T e s t . c p p
s r c / H a s h S e t T e s t . c p p
s r c / H a s h T a b l e T e s t . c p p
s r c / H a s h i n g T e s t S u i t e . c p p
s r c / H e x B i n a r y T e s t . c p p
s r c / L R U C a c h e T e s t . c p p
s r c / L i n e E n d i n g C o n v e r t e r T e s t . c p p
s r c / L i n e a r H a s h T a b l e T e s t . c p p
2014-03-12 13:58:32 +01:00
s r c / L i s t M a p T e s t . c p p
2012-06-26 14:37:02 +02:00
s r c / L o c a l D a t e T i m e T e s t . c p p
s r c / L o g S t r e a m T e s t . c p p
s r c / L o g g e r T e s t . c p p
s r c / L o g g i n g F a c t o r y T e s t . c p p
s r c / L o g g i n g R e g i s t r y T e s t . c p p
s r c / L o g g i n g T e s t S u i t e . c p p
s r c / M D 4 E n g i n e T e s t . c p p
s r c / M D 5 E n g i n e T e s t . c p p
s r c / M a n i f e s t T e s t . c p p
s r c / M e m o r y P o o l T e s t . c p p
s r c / M e m o r y S t r e a m T e s t . c p p
s r c / N D C T e s t . c p p
s r c / N a m e d E v e n t T e s t . c p p
s r c / N a m e d M u t e x T e s t . c p p
s r c / N a m e d T u p l e s T e s t . c p p
s r c / N o t i f i c a t i o n C e n t e r T e s t . c p p
s r c / N o t i f i c a t i o n Q u e u e T e s t . c p p
s r c / O b j e c t P o o l T e s t . c p p
s r c / P r i o r i t y N o t i f i c a t i o n Q u e u e T e s t . c p p
s r c / T i m e d N o t i f i c a t i o n Q u e u e T e s t . c p p
s r c / N o t i f i c a t i o n s T e s t S u i t e . c p p
s r c / N u l l S t r e a m T e s t . c p p
s r c / N u m b e r F o r m a t t e r T e s t . c p p
s r c / N u m b e r P a r s e r T e s t . c p p
s r c / P a t h T e s t . c p p
s r c / P a t t e r n F o r m a t t e r T e s t . c p p
2014-03-12 13:58:32 +01:00
s r c / P B K D F 2 E n g i n e T e s t . c p p
2012-06-26 14:37:02 +02:00
s r c / P r i o r i t y E v e n t T e s t . c p p
s r c / P r o c e s s T e s t . c p p
s r c / P r o c e s s e s T e s t S u i t e . c p p
s r c / R W L o c k T e s t . c p p
s r c / R a n d o m S t r e a m T e s t . c p p
s r c / R a n d o m T e s t . c p p
s r c / R e g u l a r E x p r e s s i o n T e s t . c p p
s r c / S H A 1 E n g i n e T e s t . c p p
s r c / S e m a p h o r e T e s t . c p p
s r c / S h a r e d L i b r a r y T e s t . c p p
s r c / S h a r e d L i b r a r y T e s t S u i t e . c p p
s r c / S h a r e d M e m o r y T e s t . c p p
s r c / S h a r e d P t r T e s t . c p p
s r c / S i m p l e F i l e C h a n n e l T e s t . c p p
s r c / S i m p l e H a s h T a b l e T e s t . c p p
s r c / S t o p w a t c h T e s t . c p p
s r c / S t r e a m C o n v e r t e r T e s t . c p p
s r c / S t r e a m C o p i e r T e s t . c p p
s r c / S t r e a m T o k e n i z e r T e s t . c p p
s r c / S t r e a m s T e s t S u i t e . c p p
s r c / S t r i n g T e s t . c p p
s r c / S t r i n g T o k e n i z e r T e s t . c p p
s r c / T a s k M a n a g e r T e s t . c p p
s r c / T a s k T e s t . c p p
s r c / T a s k T e s t S u i t e . c p p
s r c / T e e S t r e a m T e s t . c p p
s r c / T e s t C h a n n e l . c p p
s r c / T e s t P l u g i n . c p p
s r c / T e x t C o n v e r t e r T e s t . c p p
s r c / T e x t E n c o d i n g T e s t . c p p
s r c / T e x t I t e r a t o r T e s t . c p p
s r c / T e x t B u f f e r I t e r a t o r T e s t . c p p
s r c / T e x t T e s t S u i t e . c p p
s r c / T h r e a d L o c a l T e s t . c p p
s r c / T h r e a d P o o l T e s t . c p p
s r c / T h r e a d T e s t . c p p
s r c / T h r e a d i n g T e s t S u i t e . c p p
s r c / T i m e r T e s t . c p p
s r c / T i m e s p a n T e s t . c p p
s r c / T i m e s t a m p T e s t . c p p
s r c / T i m e z o n e T e s t . c p p
s r c / T u p l e s T e s t . c p p
s r c / T y p e L i s t T e s t . c p p
s r c / U R I S t r e a m O p e n e r T e s t . c p p
s r c / U R I T e s t . c p p
s r c / U R I T e s t S u i t e . c p p
s r c / U T F 8 S t r i n g T e s t . c p p
s r c / U U I D G e n e r a t o r T e s t . c p p
s r c / U U I D T e s t . c p p
s r c / U U I D T e s t S u i t e . c p p
s r c / U n i q u e E x p i r e C a c h e T e s t . c p p
s r c / U n i c o d e C o n v e r t e r T e s t . c p p
s r c / U n i q u e E x p i r e L R U C a c h e T e s t . c p p
s r c / V a r T e s t . c p p
s r c / Z L i b T e s t . c p p
)
set ( WIN_TEST_SRCS
s r c / W i n D r i v e r . c p p
)
set ( TESTUNIT "${LIBNAME}-testrunner" )
add_executable ( ${ TESTUNIT } ${ TEST_SRCS } )
2014-06-16 15:34:27 +02:00
add_test ( NAME ${ LIBNAME } WORKING_DIRECTORY ${ CMAKE_CURRENT_BINARY_DIR } COMMAND ${ TESTUNIT } -all )
set_tests_properties ( ${ LIBNAME } PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=." ) # The SharedLibaryTest has to look for shared libraries in the working directory
2012-06-26 14:37:02 +02:00
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
2013-11-01 16:46:20 +01:00
target_link_libraries ( ${ TESTUNIT } PocoFoundation CppUnit )
if ( NOT ANDROID )
target_link_libraries ( ${ TESTUNIT } pthread )
endif ( )
2012-06-26 14:37:02 +02:00
2014-06-16 15:34:27 +02:00
# The test is run in the build directory. So the test data is copied there too
add_custom_command ( TARGET ${ TESTUNIT } POST_BUILD
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ d i r e c t o r y $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d a t a $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / d a t a )
2012-06-26 14:37:02 +02:00
add_executable ( TestApp src/TestApp.cpp )
2014-06-16 15:34:27 +02:00
# The test is run in the build directory. So the TestApp is built there too because it is used by the tests
set_target_properties ( TestApp PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${ CMAKE_CURRENT_BINARY_DIR } )
2012-06-26 14:37:02 +02:00
#set_target_properties( TestApp PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
target_link_libraries ( TestApp PocoFoundation )
2014-06-16 15:34:27 +02:00
add_library ( TestLibrary SHARED src/TestLibrary.cpp )
set_target_properties ( TestLibrary PROPERTIES PREFIX "" ) # The test requires the library named TestLibrary. By default it is prefixed with lib.
# The test is run in the build directory. So the TestLibrary is built there too because it is used by the tests
set_target_properties ( TestLibrary PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${ CMAKE_CURRENT_BINARY_DIR } )
2012-06-26 14:37:02 +02:00
#set_target_properties( TestLibrary PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
target_link_libraries ( TestLibrary PocoFoundation )