diff options
author | Roman Donchenko <dpb@corrigendum.ru> | 2015-09-20 21:39:03 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2015-09-20 21:39:03 (GMT) |
commit | bc2e54db5516ed884f0affe020e52256f0c8b3d5 (patch) | |
tree | 997e1a68a082bf6f72cc4e4a4c6e4fc1f1514cfb /Tests/RunCMake/CPackConfig | |
parent | ba7f7067cafe187d5f95b87c959751cdf1a8b0b6 (diff) | |
download | CMake-bc2e54db5516ed884f0affe020e52256f0c8b3d5.zip CMake-bc2e54db5516ed884f0affe020e52256f0c8b3d5.tar.gz CMake-bc2e54db5516ed884f0affe020e52256f0c8b3d5.tar.bz2 |
Introduction of CPACK_VERBATIM_VARIABLES variable
If variable is set to TRUE, values of all variables prefixed with CPACK_
will be escaped so special characters such as dolar sign, quotes or
foreward slash will not be lost. By default variable is treated as set
to FALSE for back compatibility.
The cpack_encode_variables macro is changed into a function to remove
scope pollution. There should be no other effects.
Diffstat (limited to 'Tests/RunCMake/CPackConfig')
-rw-r--r-- | Tests/RunCMake/CPackConfig/RunCMakeTest.cmake | 2 | ||||
-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 |
5 files changed, 25 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake b/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake index ef018b5..16d2cf3 100644 --- a/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake @@ -2,3 +2,5 @@ include(RunCMake) run_cmake(Simple) run_cmake(Default) +run_cmake(Special) +run_cmake(Verbatim) 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") |