diff options
Diffstat (limited to 'Tests/RunCMake/CPackConfig')
-rw-r--r-- | Tests/RunCMake/CPackConfig/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/Default-check.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/Default.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/RunCMakeTest.cmake | 6 | ||||
-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/Special-check.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/Special.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/Verbatim-check.cmake | 10 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/Verbatim.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/check.cmake | 10 |
11 files changed, 59 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/Default-check.cmake b/Tests/RunCMake/CPackConfig/Default-check.cmake new file mode 100644 index 0000000..b67fe81 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/Default-check.cmake @@ -0,0 +1,7 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_variable(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Foo\\Bar") +test_variable(CPACK_NSIS_PACKAGE_NAME "Bar\\Foo") + +test_variable(CPACK_SOURCE_IGNORE_FILES + "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp$;\\.#;/#") diff --git a/Tests/RunCMake/CPackConfig/Default.cmake b/Tests/RunCMake/CPackConfig/Default.cmake new file mode 100644 index 0000000..3b3beb3 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/Default.cmake @@ -0,0 +1,3 @@ +# two levels of escaping to pass through CPackConfig.cmake +set(CPACK_PACKAGE_INSTALL_DIRECTORY "Foo\\\\Bar") +set(CPACK_NSIS_DISPLAY_NAME "Bar\\\\Foo") diff --git a/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake b/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake new file mode 100644 index 0000000..16d2cf3 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake @@ -0,0 +1,6 @@ +include(RunCMake) + +run_cmake(Simple) +run_cmake(Default) +run_cmake(Special) +run_cmake(Verbatim) 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/Special-check.cmake b/Tests/RunCMake/CPackConfig/Special-check.cmake new file mode 100644 index 0000000..0624b79 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/Special-check.cmake @@ -0,0 +1,5 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_variable(CPACK_BACKSLASH "\\") +test_variable(CPACK_QUOTE "a;b;c") +test_variable(CPACK_DOLLAR "ab") diff --git a/Tests/RunCMake/CPackConfig/Special.cmake b/Tests/RunCMake/CPackConfig/Special.cmake new file mode 100644 index 0000000..9442c93 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/Special.cmake @@ -0,0 +1,3 @@ +set(CPACK_BACKSLASH "\\\\") +set(CPACK_QUOTE "a\" b \"c") +set(CPACK_DOLLAR "a\${NOTHING}b") diff --git a/Tests/RunCMake/CPackConfig/Verbatim-check.cmake b/Tests/RunCMake/CPackConfig/Verbatim-check.cmake new file mode 100644 index 0000000..958547d --- /dev/null +++ b/Tests/RunCMake/CPackConfig/Verbatim-check.cmake @@ -0,0 +1,10 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_variable(CPACK_BACKSLASH "\\\\") +test_variable(CPACK_QUOTE "a\" b \"c") +test_variable(CPACK_DOLLAR "a\${NOTHING}b") + +# make sure the default for this is still set correctly with +# CPACK_VERBATIM_VARIABLES on +test_variable(CPACK_SOURCE_IGNORE_FILES + "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp$;\\.#;/#") diff --git a/Tests/RunCMake/CPackConfig/Verbatim.cmake b/Tests/RunCMake/CPackConfig/Verbatim.cmake new file mode 100644 index 0000000..4d271c3 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/Verbatim.cmake @@ -0,0 +1,5 @@ +set(CPACK_VERBATIM_VARIABLES YES) + +set(CPACK_BACKSLASH "\\\\") +set(CPACK_QUOTE "a\" b \"c") +set(CPACK_DOLLAR "a\${NOTHING}b") diff --git a/Tests/RunCMake/CPackConfig/check.cmake b/Tests/RunCMake/CPackConfig/check.cmake new file mode 100644 index 0000000..ca6229e --- /dev/null +++ b/Tests/RunCMake/CPackConfig/check.cmake @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION ${CMAKE_VERSION} FATAL_ERROR) + +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) +include(${RunCMake_TEST_BINARY_DIR}/CPackSourceConfig.cmake) |