Commit caa0949f authored by Chris Harris's avatar Chris Harris
Browse files

FIX: Add configured headers for SQL test URL's

The connection URL's for the SQL tests have been removed from the
toolkit header so they need to be moved to individual headers
for each test.

Change-Id: I4b6f3948e89342f868a621f22d3c5983238daa11
parent 1630eee7
if(VTK_MYSQL_TEST_URL)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkIOMySQLTestingCxxConfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkIOMySQLTestingCxxConfigure.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
create_test_sourcelist(Tests ${vtk-module}CxxTests.cxx
TestMySQLDatabase.cxx
TestMySQLTableReadWrite.cxx
......
......@@ -44,6 +44,7 @@
#include "vtkVariantArray.h"
#include "vtkToolkits.h"
#include "DatabaseSchemaWith2Tables.h"
#include "vtkIOMySQLTestingCxxConfigure.h"
#include <vector>
......
......@@ -27,6 +27,7 @@
#include "vtkTableToMySQLWriter.h"
#include "vtkMySQLToTableReader.h"
#include "vtkIOMySQLTestingCxxConfigure.h"
int TestMySQLTableReadWrite(int argc, char *argv[])
{
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkIOMySQLTestingCxxConfigure.h.in
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef __vtkIOMySQLTestingCxxConfigure_h
#define __vtkIOMySQLTestingCxxConfigure_h
#cmakedefine VTK_MYSQL_TEST_URL
#ifdef VTK_MYSQL_TEST_URL
# undef VTK_MYSQL_TEST_URL
# define VTK_MYSQL_TEST_URL "@VTK_MYSQL_TEST_URL@"
#endif
#endif
if(VTK_ODBC_TEST_DSN)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkIOODBCTestingCxxConfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkIOODBCTestingCxxConfigure.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
create_test_sourcelist(Tests ${vtk-module}CxxTests.cxx
TestODBCDatabase.cxx
EXTRA_INCLUDE vtkTestDriver.h
......
......@@ -29,6 +29,7 @@
#include "vtkVariant.h"
#include "vtkVariantArray.h"
#include "vtkToolkits.h"
#include "vtkIOODBCTestingCxxConfigure.h"
#include <vtksys/ios/sstream>
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkIOODBCTestingCxxConfigure.h.in
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef __vtkIOODBCTestingCxxConfigure_h
#define __vtkIOODBCTestingCxxConfigure_h
#cmakedefine VTK_ODBC_TEST_DSN
#ifdef VTK_ODBC_TEST_DSN
# undef VTK_ODBC_TEST_DSN
# define VTK_ODBC_TEST_DSN "@VTK_ODBC_TEST_DSN@"
#endif
#endif
......@@ -2,4 +2,6 @@ vtk_module(vtkIOODBC
DEPENDS
vtkCommonDataModel
vtkIOSQL
TEST_DEPENDS
vtkTestingCore
)
if(VTK_MYSQL_TEST_URL)
if(VTK_PSQL_TEST_URL)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkIOPostgresSQLTestingCxxConfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkIOPostgresSQLTestingCxxConfigure.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
create_test_sourcelist(Tests ${vtk-module}CxxTests.cxx
TestPostgreSQLDatabase
TestPostgreSQLTableReadWrite.cxx
......
......@@ -32,6 +32,7 @@
#include "vtkStringArray.h"
#include "vtkToolkits.h"
#include "DatabaseSchemaWith2Tables.h"
#include "vtkIOPostgresSQLTestingCxxConfigure.h"
#include <vector>
int TestPostgreSQLDatabase( int /*argc*/, char* /*argv*/[] )
......
......@@ -27,6 +27,7 @@
#include "vtkTableToPostgreSQLWriter.h"
#include "vtkPostgreSQLToTableReader.h"
#include "vtkIOPostgresSQLTestingCxxConfigure.h"
int TestPostgreSQLTableReadWrite(int argc, char *argv[])
{
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkIOPostgresSQLTestingCxxConfigure.h.in
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef __vtkIOPostgresSQLTestingCxxConfigure_h
#define __vtkIOPostgresSQLTestingCxxConfigure_h
#cmakedefine VTK_PSQL_TEST_URL
#ifdef VTK_PSQL_TEST_URL
# undef VTK_PSQL_TEST_URL
# define VTK_PSQL_TEST_URL "@VTK_PSQL_TEST_URL@"
#endif
#endif
......@@ -5,4 +5,5 @@ vtk_module(vtkIOPostgreSQL
vtkIOSQL
TEST_DEPENDS
vtkTestingIOSQL
vtkTestingCore
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment