Skip to content
Snippets Groups Projects
Commit 53a1d39e authored by Brad King's avatar Brad King
Browse files

COMP: Load test macros in Testing/External project

The Testing/External directory was added by commit 4f3b5222 (Create project to
build VTK module tests as an application, 2012-04-10) in order to build the
module test directories from the VTK source tree as if they were an outside
application using an installed VTK.  It loads the testing infrastructure from
the source tree but otherwise acts as a separate application and gets
everything else from the VTK package configuration file (VTKConfig).

Later commit b9293d04 (Implement add_test_mpi macro, 2012-07-25) added some
test infrastructure to the source tree but did not load it from
Testing/External.  This would have broken Testing/External except that before
the commit was merged, commit 341ea97e (Making sure that the TestingExternal
projects can be build with install tree, 2012-08-29) was added to make it work
by exposing the test infrastructure through the VTK installation.  The two
commits were merged together in one topic by commit 4d15a6c6 (Merge topic
'Cxx-Tests' into master, 2012-08-30).

However, the fix for Testing/External was not correct because it added a
dependency on the VTK source tree into the install tree.  We reverted the fix
in commit bf3c1599 (Revert "Making sure that the TestingExternal projects can
be build with install tree", 2013-02-06) and thus re-exposed the original
Testing/External problem after the introduction of the add_test_mpi macro.

Fix the original problem by directly including the vtkTestingMacros module in
the Testing/External project.  This makes the add_test_mpi macro available to
the tests that use it without affecting the VTK CMake API seen by normal
applications.

Change-Id: I0dab1c017f283b2cba74fd1422458b5651353bf5
parent 15e4ece5
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ get_filename_component(VTK_TOP_DIR ${VTKTestExternal_SOURCE_DIR}/../.. ABSOLUTE)
# Load module infrastructure macros.
list(APPEND CMAKE_MODULE_PATH ${VTK_TOP_DIR}/CMake)
include(vtkModuleMacros)
include(vtkTestingMacros)
# Find the VTK build or install tree. Assume the version matches exactly.
# One should provide VTK_DIR explicitly in our intended use cases.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment