summaryrefslogtreecommitdiffstats
path: root/Tests/UseSWIG/BasicPerl/CMakeLists.txt
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2018-04-04 14:23:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-04-04 14:24:07 (GMT)
commit74005a136ca0f6ffa1619982d2a4c947335d7254 (patch)
tree3ca5a999f7862b841cf6e8ea77e152be8e1580e2 /Tests/UseSWIG/BasicPerl/CMakeLists.txt
parentc468b9a2314a67f9d697d27c12f9c39e1301f1aa (diff)
parent8ab4e38373352c43fcedf4ac91b41114d8e31dc0 (diff)
downloadCMake-74005a136ca0f6ffa1619982d2a4c947335d7254.zip
CMake-74005a136ca0f6ffa1619982d2a4c947335d7254.tar.gz
CMake-74005a136ca0f6ffa1619982d2a4c947335d7254.tar.bz2
Merge topic 'UseSWIG-add-new-behavior'
8ab4e38373 UseSWIG: Add new behavior for better support files management 438429d6fe UseSWIG: Rework tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1891
Diffstat (limited to 'Tests/UseSWIG/BasicPerl/CMakeLists.txt')
-rw-r--r--Tests/UseSWIG/BasicPerl/CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/UseSWIG/BasicPerl/CMakeLists.txt b/Tests/UseSWIG/BasicPerl/CMakeLists.txt
new file mode 100644
index 0000000..10c1cd8
--- /dev/null
+++ b/Tests/UseSWIG/BasicPerl/CMakeLists.txt
@@ -0,0 +1,22 @@
+cmake_minimum_required(VERSION 3.1)
+
+project(TestBasicPerl CXX)
+
+include(CTest)
+
+set(language "perl")
+
+include (../BasicConfiguration.cmake)
+
+if (WIN32)
+ file (TO_CMAKE_PATH "$ENV{PATH}" perl_path)
+ string (REPLACE ";" "$<SEMICOLON>" perl_path "${perl_path}")
+ set (perl_env "PATH=$<TARGET_FILE_DIR:example>$<SEMICOLON>${perl_path}")
+else()
+ set (perl_env "LD_LIBRARY_PATH=$<TARGET_FILE_DIR:example>")
+endif()
+
+add_test (NAME BasicPerl
+ COMMAND "${CMAKE_COMMAND}" -E env "${perl_env}"
+ "${PERL_EXECUTABLE}" "-I$<TARGET_FILE_DIR:example>"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../runme.pl")