Unknown CMake command "vtk_add_test_cxx"

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Unknown CMake command "vtk_add_test_cxx"

I have built VTK with cmake 3.7.2 and Visual Studio 2012 on a windows 10 machine.But i came across the followingg error while compiling the example in VTK-7.1.1\Rendering\OpenVR\Testing\Cxx with cmake.

CMake Error at CMakeLists.txt:3 (vtk_add_test_cxx):
  Unknown CMake command "vtk_add_test_cxx".

I have added the function vtk_add_test_cxx in vtkTestingMacros.cmake file as suggested in https://gitlab.kitware.com/Wu/vtk/commit/dbb4c57325301815a2500ae244d3e7e60a1030fe#9a1b095f3cbd05f3c789b96f70be522fdf858e70_133_135 but didnt seem to solve.Is there any way to correct this?

Thanks for any help!