Commit 4e7c9fc5 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell
Browse files

Made a benchmark module, moved the benchmark tools

This adds a new utility module for benchmarks, and moves a couple of
the benchmarking utilities we have been working on to it.

Change-Id: Iae575902af227f58487ddde985361d731834f337
parent fd6312ec
......@@ -82,45 +82,3 @@ if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
endif()
vtk_test_cxx_executable(${vtk-module}CxxTests tests)
add_executable(TimingTests MACOSX_BUNDLE TimingTests.cxx vtkRenderTimings.cxx)
# need some flags for the object factory auto init code
if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
set(compile_defs VTK_OPENGL2)
endif()
if(TARGET vtkDomainsChemistry)
if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
set(extra_deps vtkDomainsChemistryOpenGL2)
else()
set(extra_deps vtkDomainsChemistry)
endif()
list(APPEND compile_defs HAVE_CHEMISTRY)
include_directories(${VTK_SOURCE_DIR}/Domains/Chemistry
${VTK_BINARY_DIR}/Domains/Chemistry)
endif()
set_source_files_properties(TimingTests.cxx APPEND PROPERTIES
COMPILE_DEFINITIONS "${compile_defs}")
target_link_libraries(TimingTests
vtkRendering${VTK_RENDERING_BACKEND}
vtkFiltersSources
vtkCommonComputationalGeometry
vtksys
${extra_deps}
)
add_executable(GLBenchmarking MACOSX_BUNDLE GLBenchmarking.cxx)
set_source_files_properties(GLBenchmarking.cxx APPEND PROPERTIES
COMPILE_DEFINITIONS "${compile_defs}")
target_link_libraries(GLBenchmarking
vtkRendering${VTK_RENDERING_BACKEND}
vtkFiltersSources
vtkCommonComputationalGeometry
vtkViewsContext2D
vtkRenderingContext${VTK_RENDERING_BACKEND}
vtkRenderingFreeType${VTK_RENDERING_BACKEND}
vtkChartsCore
vtksys
${extra_deps}
)
......@@ -22,11 +22,6 @@ vtk_module(vtkRenderingCore
vtkImagingSources
vtkFiltersSources
vtkFiltersProgrammable
# Can't stay here...
vtkRenderingContext${VTK_RENDERING_BACKEND}
vtkChartsCore
vtkViewsContext2D
KIT
vtkRendering
)
# Load up the CMake variables we need.
vtk_module_impl()
vtk_module_config(${vtk-module} ${${vtk-module}_DEPENDS})
# Add our test executables.
add_executable(TimingTests MACOSX_BUNDLE TimingTests.cxx vtkRenderTimings.cxx)
target_link_libraries(TimingTests ${${vtk-module}_LIBRARIES})
set_source_files_properties(TimingTests.cxx APPEND PROPERTIES
COMPILE_DEFINITIONS "${${vtk-module}_DEFINITIONS}")
if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
set(compile_defs VTK_OPENGL2)
endif()
if(TARGET vtkDomainsChemistry)
if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
set(extra_deps vtkDomainsChemistryOpenGL2)
else()
set(extra_deps vtkDomainsChemistry)
endif()
list(APPEND compile_defs HAVE_CHEMISTRY)
include_directories(${VTK_SOURCE_DIR}/Domains/Chemistry
${VTK_BINARY_DIR}/Domains/Chemistry)
endif()
set_source_files_properties(TimingTests.cxx APPEND PROPERTIES
COMPILE_DEFINITIONS "${compile_defs}")
target_link_libraries(TimingTests ${extra_deps})
add_executable(GLBenchmarking MACOSX_BUNDLE GLBenchmarking.cxx)
target_link_libraries(GLBenchmarking ${${vtk-module}_LIBRARIES})
set_source_files_properties(GLBenchmarking.cxx APPEND PROPERTIES
COMPILE_DEFINITIONS "${${vtk-module}_DEFINITIONS}")
......@@ -14,15 +14,15 @@
=========================================================================*/
#include "vtkAutoInit.h"
VTK_MODULE_INIT(vtkRenderingFreeType)
//VTK_MODULE_INIT(vtkRenderingFreeType)
#ifdef VTK_OPENGL2
VTK_MODULE_INIT(vtkRenderingOpenGL2)
VTK_MODULE_INIT(vtkRenderingContextOpenGL2)
VTK_MODULE_INIT(vtkRenderingFreeTypeOpenGL2)
//VTK_MODULE_INIT(vtkRenderingOpenGL2)
//VTK_MODULE_INIT(vtkRenderingContextOpenGL2)
//VTK_MODULE_INIT(vtkRenderingFreeTypeOpenGL2)
#else
VTK_MODULE_INIT(vtkRenderingOpenGL)
VTK_MODULE_INIT(vtkRenderingContextOpenGL)
VTK_MODULE_INIT(vtkRenderingFreeTypeOpenGL)
//VTK_MODULE_INIT(vtkRenderingOpenGL)
//VTK_MODULE_INIT(vtkRenderingContextOpenGL)
//VTK_MODULE_INIT(vtkRenderingFreeTypeOpenGL)
#endif
#include "vtkActor.h"
......
vtk_module(vtkUtilitiesBenchmarks
DEPENDS
vtkChartsCore
vtkCommonComputationalGeometry
vtkRenderingContext${VTK_RENDERING_BACKEND}
vtkRendering${VTK_RENDERING_BACKEND}
vtkRenderingFreeType${VTK_RENDERING_BACKEND}
vtkInteractionStyle
vtkViewsContext2D
vtkFiltersGeometry
vtksys
EXCLUDE_FROM_WRAPPING
)
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