Skip to content

Commit 10ef2b2

Browse files
committed
CMake: Remove WinDriver usage in tests
Add WinCEDriver to packages supporting it
1 parent b36b47d commit 10ef2b2

17 files changed

Lines changed: 45 additions & 97 deletions

File tree

CppParser/testsuite/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
88
file(GLOB_RECURSE HDRS_G "src/*.h" )
99
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
1010

11-
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
11+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
1212
src/WinDriver.cpp
1313
)
1414

1515
add_executable( ${TESTUNIT} ${TEST_SRCS} )
1616
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
1717
target_link_libraries( ${TESTUNIT} PocoCppParser PocoFoundation CppUnit )
18-
if( WIN32)
19-
add_definitions("-D_AFXDLL")
20-
target_link_libraries( ${TESTUNIT} WinTestRunner)
21-
endif(WIN32)

CppUnit/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@ target_include_directories( "${LIBNAME}"
2020
$<INSTALL_INTERFACE:include>
2121
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
2222
)
23-
24-
if(WIN32)
25-
add_subdirectory(WinTestRunner)
26-
endif(WIN32)

Crypto/testsuite/CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
88
file(GLOB_RECURSE HDRS_G "src/*.h" )
99
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
1010

11-
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
11+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
1212
src/WinDriver.cpp
1313
)
1414

@@ -19,11 +19,6 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
1919
add_executable( ${TESTUNIT} ${TEST_SRCS} )
2020
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
2121
target_link_libraries( ${TESTUNIT} PocoCrypto PocoNetSSL PocoXML PocoUtil PocoFoundation CppUnit )
22-
if( WIN32)
23-
#TODO: Is this flag always required?
24-
add_definitions("-D_AFXDLL")
25-
target_link_libraries( ${TESTUNIT} WinTestRunner)
26-
else()
22+
if(UNIX)
2723
target_link_libraries( ${TESTUNIT} pthread)
28-
endif(WIN32)
29-
24+
endif(UNIX)

Data/MySQL/testsuite/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
88
file(GLOB_RECURSE HDRS_G "src/*.h" )
99
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
1010

11-
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
11+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
1212
src/WinDriver.cpp
1313
)
1414

1515
add_executable( ${TESTUNIT} ${TEST_SRCS} )
1616
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
1717
target_link_libraries( ${TESTUNIT} PocoDataMySQL PocoData PocoFoundation CppUnit )
18-

Data/ODBC/testsuite/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,10 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
88
file(GLOB_RECURSE HDRS_G "src/*.h" )
99
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
1010

11-
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
11+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
1212
src/WinDriver.cpp
1313
)
1414

1515
add_executable( ${TESTUNIT} ${TEST_SRCS} )
1616
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
1717
target_link_libraries( ${TESTUNIT} PocoDataODBC PocoData PocoFoundation CppUnit )
18-
if( WIN32)
19-
add_definitions("-D_AFXDLL")
20-
target_link_libraries( ${TESTUNIT} WinTestRunner)
21-
endif(WIN32)
22-

Data/SQLite/testsuite/CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
88
file(GLOB_RECURSE HDRS_G "src/*.h" )
99
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
1010

11-
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
11+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
1212
src/WinDriver.cpp
1313
)
1414

15+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
16+
src/WinCEDriver.cpp
17+
)
18+
1519
add_executable( ${TESTUNIT} ${TEST_SRCS} )
1620
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
1721
target_link_libraries( ${TESTUNIT} PocoDataSQLite PocoData PocoFoundation CppUnit )
18-
if( WIN32)
19-
#TODO: Is this flag always required?
20-
add_definitions("-D_AFXDLL")
21-
target_link_libraries( ${TESTUNIT} WinTestRunner)
22-
endif(WIN32)
23-

Data/testsuite/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
88
file(GLOB_RECURSE HDRS_G "src/*.h" )
99
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
1010

11-
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
11+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
1212
src/WinDriver.cpp
1313
)
1414

15+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
16+
src/WinCEDriver.cpp
17+
)
18+
1519
#TODO: Why is this file there? It doesn't compile if it is include in the sources
1620
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
1721
src/StatementImpl.cpp
@@ -20,8 +24,3 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
2024
add_executable( ${TESTUNIT} ${TEST_SRCS} )
2125
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
2226
target_link_libraries( ${TESTUNIT} PocoData PocoUtil PocoXML PocoFoundation CppUnit)
23-
if( WIN32)
24-
#TODO: Is this flag always required?
25-
add_definitions("-D_AFXDLL")
26-
target_link_libraries( ${TESTUNIT} WinTestRunner)
27-
endif(WIN32)

Foundation/testsuite/CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
1515
file(GLOB_RECURSE HDRS_G "src/*.h" )
1616
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
1717

18-
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
18+
# WinDriver depends on WinTestRunner which depends on MFC, and we don't want that
19+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
1920
src/WinDriver.cpp
2021
)
2122

@@ -26,14 +27,11 @@ POCO_SOURCES_PLAT( TEST_SRCS FoundationTest WINCE
2627
add_executable( ${TESTUNIT} ${TEST_SRCS} )
2728
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMAND ${TESTUNIT} -all)
2829
set_tests_properties(${LIBNAME} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=.") # The SharedLibaryTest has to look for shared libraries in the working directory
29-
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
30+
3031
target_link_libraries( ${TESTUNIT} PocoFoundation CppUnit )
31-
if( WIN32)
32-
add_definitions("-D_AFXDLL")
33-
target_link_libraries( ${TESTUNIT} WinTestRunner)
34-
else()
32+
if(UNIX)
3533
target_link_libraries( ${TESTUNIT} pthread)
36-
endif(WIN32)
34+
endif(UNIX)
3735

3836
# The test is run in the runtime directory. So the test data is copied there too
3937
add_custom_command(TARGET ${TESTUNIT} POST_BUILD

JSON/testsuite/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,18 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
88
file(GLOB_RECURSE HDRS_G "src/*.h" )
99
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
1010

11-
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
11+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
1212
src/WinDriver.cpp
1313
)
1414

15+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
16+
src/WinCEDriver.cpp
17+
)
18+
1519
add_executable( ${TESTUNIT} ${TEST_SRCS} )
1620
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
1721
target_link_libraries( ${TESTUNIT} PocoJSON PocoFoundation CppUnit )
18-
if( WIN32)
19-
add_definitions("-D_AFXDLL")
20-
target_link_libraries( ${TESTUNIT} WinTestRunner)
21-
endif(WIN32)
2222

2323
# The test is run in the build directory. So the test data is copied there too
2424
add_custom_command(TARGET ${TESTUNIT} POST_BUILD
2525
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data )
26-

MongoDB/testsuite/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
88
file(GLOB_RECURSE HDRS_G "src/*.h" )
99
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
1010

11-
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
11+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
1212
src/WinDriver.cpp
1313
)
1414

15+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
16+
src/WinCEDriver.cpp
17+
)
18+
1519
set(TESTUNIT "${LIBNAME}-testrunner")
1620

1721
add_executable( ${TESTUNIT} ${TEST_SRCS} )
1822
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
1923
target_link_libraries( ${TESTUNIT} PocoMongoDB PocoFoundation CppUnit )
20-
if( WIN32)
21-
#TODO: Is this flag always required?
22-
add_definitions("-D_AFXDLL")
23-
target_link_libraries( ${TESTUNIT} WinTestRunner)
24-
endif(WIN32)

0 commit comments

Comments
 (0)