Changeset: 54684b6243b4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/54684b6243b4 Added Files: clients/odbc/tests/CMakeLists.txt clients/odbc/tests/ODBCStmtAttr.c Removed Files: clients/odbc/samples/testStmtAttr.c Modified Files: clients/odbc/CMakeLists.txt clients/odbc/samples/CMakeLists.txt Branch: default Log Message:
Introduce a separate directory for ODBC test programs. Moving first program from samples to tests. Also change name of program to start with ODBC to avoid potential name conflicts as the binaries are placed in the bin directory. diffs (82 lines): diff --git a/clients/odbc/CMakeLists.txt b/clients/odbc/CMakeLists.txt --- a/clients/odbc/CMakeLists.txt +++ b/clients/odbc/CMakeLists.txt @@ -14,4 +14,5 @@ if(ODBC_FOUND) endif() add_subdirectory(driver) add_subdirectory(samples) + add_subdirectory(tests) endif() diff --git a/clients/odbc/samples/CMakeLists.txt b/clients/odbc/samples/CMakeLists.txt --- a/clients/odbc/samples/CMakeLists.txt +++ b/clients/odbc/samples/CMakeLists.txt @@ -29,13 +29,6 @@ if(TESTING) PRIVATE ODBC::ODBC) - add_executable(testStmtAttr - testStmtAttr.c) - - target_link_libraries(testStmtAttr - PRIVATE - ODBC::ODBC) - add_executable(metadata metadata.c) @@ -47,7 +40,6 @@ if(TESTING) odbcsample1 testgetinfo arraytest - testStmtAttr metadata RUNTIME DESTINATION @@ -59,7 +51,6 @@ if(TESTING) $<TARGET_PDB_FILE:odbcsample1> $<TARGET_PDB_FILE:testgetinfo> $<TARGET_PDB_FILE:arraytest> - $<TARGET_PDB_FILE:testStmtAttr> $<TARGET_PDB_FILE:metadata> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL) diff --git a/clients/odbc/tests/CMakeLists.txt b/clients/odbc/tests/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/clients/odbc/tests/CMakeLists.txt @@ -0,0 +1,32 @@ +#[[ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Copyright 1997 - July 2008 CWI, August 2008 - 2022 MonetDB B.V. +#]] + +include_directories($<$<BOOL:${ODBC_FOUND}>:${ODBC_INCLUDE_DIRS}>) + +if(TESTING) + add_executable(ODBCStmtAttr + ODBCStmtAttr.c) + + target_link_libraries(ODBCStmtAttr + PRIVATE + ODBC::ODBC) + + install(TARGETS + ODBCStmtAttr + RUNTIME + DESTINATION + ${CMAKE_INSTALL_BINDIR} + COMPONENT clienttest) + + if(WIN32) + install(FILES + $<TARGET_PDB_FILE:ODBCStmtAttr> + DESTINATION ${CMAKE_INSTALL_BINDIR} + OPTIONAL) + endif() +endif() diff --git a/clients/odbc/samples/testStmtAttr.c b/clients/odbc/tests/ODBCStmtAttr.c rename from clients/odbc/samples/testStmtAttr.c rename to clients/odbc/tests/ODBCStmtAttr.c _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org