Commit 17ba4db8 authored by Ben Boeckel's avatar Ben Boeckel

vtkUtilitiesBenchmarks: update to the new module system

parent 18da7bdf
# Load up the CMake variables we need.
vtk_module_export_info()
vtk_module_config(${vtk-module} ${${vtk-module}_DEPENDS})
set(classes
vtkRenderTimings)
# Placeholders
set(extra_deps)
set(compile_defs)
vtk_module_add_module(VTK::UtilitiesBenchmarks
CLASSES ${classes})
# Add our test executables.
add_executable(TimingTests MACOSX_BUNDLE
TimingTests.cxx
vtkRenderTimings.cxx
)
target_link_libraries(TimingTests ${${vtk-module}_LIBRARIES})
set_property(TARGET TimingTests APPEND PROPERTY
COMPILE_DEFINITIONS "${${vtk-module}_DEFINITIONS}")
vtk_module_add_executable(TimingTests
NO_INSTALL
TimingTests.cxx)
target_link_libraries(TimingTests
PRIVATE
VTK::UtilitiesBenchmarks)
# Chemistry target
if(TARGET vtkDomainsChemistry)
list(APPEND extra_deps vtkDomainsChemistryOpenGL2)
list(APPEND compile_defs HAVE_CHEMISTRY)
include_directories(${VTK_SOURCE_DIR}/Domains/Chemistry
${VTK_BINARY_DIR}/Domains/Chemistry)
endif()
vtk_module_autoinit(
TARGETS TimingTests
MODULES vtkUtilitiesBenchmarks)
if(compile_defs)
set_source_files_properties(TimingTests.cxx APPEND PROPERTIES
COMPILE_DEFINITIONS "${compile_defs}")
endif()
vtk_module_add_executable(GLBenchmarking
NO_INSTALL
GLBenchmarking.cxx)
target_link_libraries(GLBenchmarking
PRIVATE
VTK::ChartsCore
VTK::UtilitiesBenchmarks
VTK::ViewsContext2D)
if (extra_deps)
target_link_libraries(TimingTests ${extra_deps})
endif()
add_executable(GLBenchmarking MACOSX_BUNDLE
GLBenchmarking.cxx
)
target_link_libraries(GLBenchmarking ${${vtk-module}_LIBRARIES})
set_property(TARGET GLBenchmarking APPEND PROPERTY
COMPILE_DEFINITIONS "${${vtk-module}_DEFINITIONS}")
vtk_module_autoinit(
TARGETS GLBenchmarking
MODULES VTK::ChartsCore
VTK::UtilitiesBenchmarks
VTK::ViewsContext2D)
......@@ -13,11 +13,6 @@
=========================================================================*/
#include "vtkAutoInit.h"
//VTK_MODULE_INIT(vtkRenderingFreeType)
//VTK_MODULE_INIT(vtkRenderingOpenGL2)
//VTK_MODULE_INIT(vtkRenderingContextOpenGL2)
#include "vtkActor.h"
#include "vtkAxis.h"
#include "vtkCamera.h"
......
......@@ -39,10 +39,8 @@ int main( int argc, char *argv[] )
a.TestsToRun.push_back(new glyphTest("Glyphing"));
#ifdef HAVE_CHEMISTRY
a.TestsToRun.push_back(new moleculeTest("Molecule"));
a.TestsToRun.push_back(new moleculeTest("MoleculeAtomsOnly",true));
#endif
a.TestsToRun.push_back(new volumeTest("Volume", false));
a.TestsToRun.push_back(new volumeTest("VolumeWithShading", true));
......
vtk_module(vtkUtilitiesBenchmarks
EXCLUDE_FROM_WRAPPING
DEPENDS
vtkCommonComputationalGeometry
vtkCommonCore
vtkCommonDataModel
vtkCommonSystem
vtkCommonTransforms
vtkDomainsChemistry
vtkFiltersCore
vtkFiltersSources
vtkImagingCore
vtkRenderingOpenGL2
vtkRenderingContextOpenGL2
vtkRenderingCore
vtkRenderingVolume
vtkRenderingVolumeOpenGL2
vtksys
PRIVATE_DEPENDS
vtkChartsCore
vtkIOCore
vtkRenderingContext2D
vtkViewsContext2D
)
NAME
VTK::UtilitiesBenchmarks
LIBRARY_NAME
vtkUtilitiesBenchmarks
DEPENDS
VTK::CommonComputationalGeometry
VTK::CommonCore
VTK::CommonDataModel
VTK::CommonSystem
VTK::CommonTransforms
VTK::DomainsChemistry
VTK::FiltersCore
VTK::FiltersSources
VTK::ImagingCore
VTK::RenderingContextOpenGL2
VTK::RenderingCore
VTK::RenderingOpenGL2
VTK::RenderingVolume
VTK::RenderingVolumeOpenGL2
VTK::vtksys
PRIVATE_DEPENDS
VTK::ChartsCore
VTK::IOCore
VTK::RenderingContext2D
VTK::ViewsContext2D
EXCLUDE_WRAP
......@@ -247,7 +247,6 @@ class glyphTest : public vtkRTTest
};
#ifdef HAVE_CHEMISTRY
/*=========================================================================
Define a test for molecules
=========================================================================*/
......@@ -257,8 +256,6 @@ Define a test for molecules
#include "vtkPointLocator.h"
#include "vtkMath.h"
VTK_MODULE_INIT(vtkDomainsChemistryOpenGL2);
class moleculeTest : public vtkRTTest
{
public:
......@@ -385,7 +382,6 @@ class moleculeTest : public vtkRTTest
protected:
bool AtomsOnly;
};
#endif
/*=========================================================================
Define a test for volume rendering
......@@ -743,3 +739,4 @@ class manyActorTest : public vtkRTTest
};
#endif
// VTK-HeaderTest-Exclude: vtkRenderTimingTests.h
......@@ -20,6 +20,7 @@
* Define the classes we use for running timing benchmarks
*/
#include "vtkUtilitiesBenchmarksModule.h"
#include "vtkTimerLog.h"
#include <vtksys/CommandLineArguments.hxx>
#include <map>
......@@ -28,7 +29,7 @@ class vtkRTTestResult;
class vtkRTTestSequence;
class vtkRenderTimings;
class vtkRTTest
class VTKUTILITIESBENCHMARKS_EXPORT vtkRTTest
{
public:
// what is the name of this test
......@@ -76,7 +77,7 @@ protected:
int RenderWidth, RenderHeight;
};
class vtkRTTestResult
class VTKUTILITIESBENCHMARKS_EXPORT vtkRTTestResult
{
public:
std::map<std::string,double> Results;
......@@ -93,7 +94,7 @@ public:
}
};
class vtkRTTestSequence
class VTKUTILITIESBENCHMARKS_EXPORT vtkRTTestSequence
{
public:
virtual void Run();
......@@ -137,7 +138,7 @@ protected:
// a class to run a bunch of timing tests and
// report the results
class vtkRenderTimings
class VTKUTILITIESBENCHMARKS_EXPORT vtkRenderTimings
{
public:
vtkRenderTimings();
......@@ -185,3 +186,4 @@ private:
};
#endif
// VTK-HeaderTest-Exclude: vtkRenderTimings.h
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