diff options
author | Craig Scott <craig.scott@crascit.com> | 2018-11-05 04:58:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-11-05 12:56:03 (GMT) |
commit | 20d5e77a270639a124fea587bb68b2fb6a5356fc (patch) | |
tree | c08b444f63cad8d3b337dc21ae4684f3cd0aeba5 /Tests/RunCMake/CPack/External | |
parent | 44cc305ac12d58fe476f815b89f42288455e44a9 (diff) | |
download | CMake-20d5e77a270639a124fea587bb68b2fb6a5356fc.zip CMake-20d5e77a270639a124fea587bb68b2fb6a5356fc.tar.gz CMake-20d5e77a270639a124fea587bb68b2fb6a5356fc.tar.bz2 |
CPack: Rename Ext generator to External
Ext and External were used inconsistently in the code and the
docs. This change converts all uses of Ext to External, including
within variable names used by the generator.
Diffstat (limited to 'Tests/RunCMake/CPack/External')
-rw-r--r-- | Tests/RunCMake/CPack/External/Helpers.cmake | 31 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/External/Prerequirements.cmake | 0 |
2 files changed, 31 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/External/Helpers.cmake b/Tests/RunCMake/CPack/External/Helpers.cmake new file mode 100644 index 0000000..2c67e06 --- /dev/null +++ b/Tests/RunCMake/CPack/External/Helpers.cmake @@ -0,0 +1,31 @@ +function(getPackageNameGlobexpr NAME COMPONENT VERSION REVISION FILE_NO RESULT_VAR) + set(${RESULT_VAR} "${NAME}-${VERSION}-*.json" PARENT_SCOPE) +endfunction() + +function(getPackageContentList FILE RESULT_VAR) + set("${RESULT_VAR}" "" PARENT_SCOPE) +endfunction() + +function(toExpectedContentList FILE_NO CONTENT_VAR) + set("${CONTENT_VAR}" "" PARENT_SCOPE) +endfunction() + +set(ALL_FILES_GLOB "*.json") + +function(check_ext_json EXPECTED_FILE ACTUAL_FILE) + file(READ "${EXPECTED_FILE}" _expected_regex) + file(READ "${ACTUAL_FILE}" _actual_contents) + + string(REGEX REPLACE "\n+$" "" _expected_regex "${_expected_regex}") + string(REGEX REPLACE "\n+$" "" _actual_contents "${_actual_contents}") + + if(NOT "${_actual_contents}" MATCHES "${_expected_regex}") + message(FATAL_ERROR + "Output JSON does not match expected regex.\n" + "Expected regex:\n" + "${_expected_regex}\n" + "Actual output:\n" + "${_actual_contents}\n" + ) + endif() +endfunction() diff --git a/Tests/RunCMake/CPack/External/Prerequirements.cmake b/Tests/RunCMake/CPack/External/Prerequirements.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CPack/External/Prerequirements.cmake |