mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-07 11:24:30 +02:00
cmake: Cleanup CMakeLists.txt for all components
- Add missing CMakeLists.txt - Use POCO_ macros to improve code structure in XCode/VisualStudio - Better ODBC detection - Remove unnecessary commented out code The CMake documentation recommends explicitly listing source files, but because CMake is not the primary build system GLOB patterns are used for the moment.
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
set( TEST_SRCS
|
||||
src/Driver.cpp
|
||||
src/MySQLTest.cpp
|
||||
src/MySQLTestSuite.cpp
|
||||
src/SQLExecutor.cpp
|
||||
)
|
||||
|
||||
#include_directories()
|
||||
|
||||
set( WIN_TEST_SRCS
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
set(TESTUNIT "${LIBNAME}-testrunner")
|
||||
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
||||
POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable( ${TESTUNIT} ${TEST_SRCS} )
|
||||
#set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} )
|
||||
add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all)
|
||||
target_link_libraries( ${TESTUNIT} PocoDataMySQL PocoData PocoFoundation CppUnit )
|
||||
|
||||
|
Reference in New Issue
Block a user