summaryrefslogtreecommitdiffstats
path: root/Tests/Contracts
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2010-09-21 14:23:09 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2010-09-21 14:23:09 (GMT)
commitfd343a1a36c4f6ff62f67acfc5506fb2592858b3 (patch)
tree15ff3e3bc19b2bce25e267f3afd67d92aaa4a1da /Tests/Contracts
parent775697d5f5e8812dc642d1e21e7bc5405df943cd (diff)
downloadCMake-fd343a1a36c4f6ff62f67acfc5506fb2592858b3.zip
CMake-fd343a1a36c4f6ff62f67acfc5506fb2592858b3.tar.gz
CMake-fd343a1a36c4f6ff62f67acfc5506fb2592858b3.tar.bz2
Add a "Contract" test for VTK. The test downloads and builds VTK.
The idea is that we can make sure that CMake is staying backwards compatible by testing projects against CMake as the changes are made in CMake. Because these tests will take a long time to run, they will not be enabled by default. Instead, they will be enabled by putting a cache variable into CMake.
Diffstat (limited to 'Tests/Contracts')
-rw-r--r--Tests/Contracts/vtk542/CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/Tests/Contracts/vtk542/CMakeLists.txt b/Tests/Contracts/vtk542/CMakeLists.txt
new file mode 100644
index 0000000..cfb8b16
--- /dev/null
+++ b/Tests/Contracts/vtk542/CMakeLists.txt
@@ -0,0 +1,30 @@
+# The VTK external project for CMake
+# ---------------------------------------------------------------------------
+cmake_minimum_required(VERSION 2.8)
+project(vtk542)
+include(ExternalProject)
+
+
+set(vtk_source "${CMAKE_CURRENT_BINARY_DIR}/VTK-source")
+set(vtk_binary "${CMAKE_CURRENT_BINARY_DIR}/VTK-build")
+
+ExternalProject_Add(VTK
+ DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}
+ URL "http://www.vtk.org/files/release/5.4/vtk-5.4.2.tar.gz"
+ URL_MD5 c2c797091d4b2128d9a1bd32c4b78227
+ SOURCE_DIR ${vtk_source}
+ BINARY_DIR ${vtk_binary}
+ CMAKE_GENERATOR "${CMAKE_GENERATOR}"
+ CMAKE_ARGS
+ -DBUILD_EXAMPLES:BOOL=ON
+ -DBUILD_TESTING:BOOL=ON
+ INSTALL_COMMAND ""
+ )
+# make it so that each build will run make in the VTK build tree
+ExternalProject_Add_Step(VTK forcebuild
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${CMAKE_CURRENT_BUILD_DIR}/VTK-prefix/src/VTK-stamp/VTK-build
+ DEPENDEES configure
+ DEPENDERS build
+ ALWAYS 1
+ )