diff options
author | Roman Donchenko <dpb@corrigendum.ru> | 2015-08-28 06:07:52 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2015-08-28 06:07:52 (GMT) |
commit | 674dc0b33566b433b6ac5751f965b7d0ff952e73 (patch) | |
tree | 381e9fd70668f9ad5440324533617f2272beffd0 /Tests/RunCMake/CPackConfig | |
parent | 33df7f36d0b99a87880ee76d39b5814c98e78bd1 (diff) | |
download | CMake-674dc0b33566b433b6ac5751f965b7d0ff952e73.zip CMake-674dc0b33566b433b6ac5751f965b7d0ff952e73.tar.gz CMake-674dc0b33566b433b6ac5751f965b7d0ff952e73.tar.bz2 |
CPack generator independent tests
CPackConfig.cmake file generation from CMake test suite.
Currently it contains only a simple test without special
characters in variable value.
Test is not part of RunCMake/CPack as those tests are
expected to be run for a specified generator.
Diffstat (limited to 'Tests/RunCMake/CPackConfig')
-rw-r--r-- | Tests/RunCMake/CPackConfig/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/RunCMakeTest.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/Simple-check.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/Simple.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/check.cmake | 7 |
5 files changed, 20 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPackConfig/CMakeLists.txt b/Tests/RunCMake/CPackConfig/CMakeLists.txt new file mode 100644 index 0000000..9a9e7b4 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.3) + +project(${RunCMake_TEST}) +include(${RunCMake_TEST}.cmake) + +include(CPack) diff --git a/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake b/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake new file mode 100644 index 0000000..6787eb8 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(Simple) diff --git a/Tests/RunCMake/CPackConfig/Simple-check.cmake b/Tests/RunCMake/CPackConfig/Simple-check.cmake new file mode 100644 index 0000000..6e0cf6f --- /dev/null +++ b/Tests/RunCMake/CPackConfig/Simple-check.cmake @@ -0,0 +1,3 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_variable(CPACK_FOO "bar baz;quux") diff --git a/Tests/RunCMake/CPackConfig/Simple.cmake b/Tests/RunCMake/CPackConfig/Simple.cmake new file mode 100644 index 0000000..c9f6541 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/Simple.cmake @@ -0,0 +1 @@ +set(CPACK_FOO "bar baz;quux") diff --git a/Tests/RunCMake/CPackConfig/check.cmake b/Tests/RunCMake/CPackConfig/check.cmake new file mode 100644 index 0000000..2fc9f11 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/check.cmake @@ -0,0 +1,7 @@ +function(test_variable NAME EXPECTED_VALUE) + if(NOT "${${NAME}}" STREQUAL "${EXPECTED_VALUE}") + message(FATAL_ERROR "${NAME}: variable mismatch; expected [${EXPECTED_VALUE}] actual [${${NAME}}]") + endif() +endfunction() + +include(${RunCMake_TEST_BINARY_DIR}/CPackConfig.cmake) |