summaryrefslogtreecommitdiffstats
path: root/Tests/Contracts
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-06 15:21:54 (GMT)
committerBrad King <brad.king@kitware.com>2017-11-08 11:47:26 (GMT)
commit05e9f6ec52a2cb87b529ee41059d809446a8e50d (patch)
tree8b276bea87422a49f539d1fc46c977ecdfb69ed8 /Tests/Contracts
parentb104bcfd98add349f7624887073c79a84ae41c44 (diff)
downloadCMake-05e9f6ec52a2cb87b529ee41059d809446a8e50d.zip
CMake-05e9f6ec52a2cb87b529ee41059d809446a8e50d.tar.gz
CMake-05e9f6ec52a2cb87b529ee41059d809446a8e50d.tar.bz2
Tests: Add contract test for PLplot
Diffstat (limited to 'Tests/Contracts')
-rw-r--r--Tests/Contracts/PLplot/CMakeLists.txt18
-rw-r--r--Tests/Contracts/PLplot/Configure.cmake4
2 files changed, 22 insertions, 0 deletions
diff --git a/Tests/Contracts/PLplot/CMakeLists.txt b/Tests/Contracts/PLplot/CMakeLists.txt
new file mode 100644
index 0000000..b87b4c3
--- /dev/null
+++ b/Tests/Contracts/PLplot/CMakeLists.txt
@@ -0,0 +1,18 @@
+cmake_minimum_required(VERSION 3.9)
+project(PLplotDriver NONE)
+include(ExternalProject)
+include(${CMAKE_CURRENT_SOURCE_DIR}/../Home.cmake)
+set(PLplot_PREFIX "${HOME}/.cmake/Contracts/PLplot")
+file(REMOVE_RECURSE "${PLplot_PREFIX}")
+separate_arguments(PLplot_CMAKE_ARGS UNIX_COMMAND "${PLplot_CMAKE_FLAGS}")
+if(NOT PLplot_GIT_TAG)
+ set(PLplot_GIT_TAG "plplot-5.13.0")
+endif()
+ExternalProject_Add(PLplot
+ GIT_REPOSITORY "https://git.code.sf.net/p/plplot/plplot.git"
+ GIT_TAG "${PLplot_GIT_TAG}"
+ PREFIX "${PLplot_PREFIX}"
+ CMAKE_ARGS
+ -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
+ ${PLplot_CMAKE_ARGS}
+ )
diff --git a/Tests/Contracts/PLplot/Configure.cmake b/Tests/Contracts/PLplot/Configure.cmake
new file mode 100644
index 0000000..83591d4
--- /dev/null
+++ b/Tests/Contracts/PLplot/Configure.cmake
@@ -0,0 +1,4 @@
+set(Contracts.PLplot_BUILD_OPTIONS
+ -DPLplot_CMAKE_FLAGS=${CMake_TEST_CONTRACT_PLplot_CMAKE_FLAGS}
+ -DPLplot_GIT_TAG=${CMake_TEST_CONTRACT_PLplot_GIT_TAG}
+ )