summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-03-01 20:30:14 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-03-01 20:30:14 (GMT)
commitb5b4aa2f713fd7e18a70b09d52aec1841c8393cf (patch)
tree71c69db9340161b1bc8bf89297e66104cea2dafe /Tests
parentc55ce31c6e8a8e05333fcd8b159939aeef7f8aff (diff)
parent3fb89cf8bdae9b534dddb45b786903de4c9ac7aa (diff)
downloadCMake-b5b4aa2f713fd7e18a70b09d52aec1841c8393cf.zip
CMake-b5b4aa2f713fd7e18a70b09d52aec1841c8393cf.tar.gz
CMake-b5b4aa2f713fd7e18a70b09d52aec1841c8393cf.tar.bz2
Merge topic 'CPack-ChangeComponentNamingScheme'
3fb89cf CPack remove previously CPack generated files (if any) before running CPack f2ab270 CPack fix KWStyle warning 4deb308 CPack Authorize DISPLAY_NAME usage in component package 8c450f6 CPack remove "-ALL" suffix for ALL-IN-ONE packages
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake31
1 files changed, 20 insertions, 11 deletions
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index d5137bd..45a3b17 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -32,17 +32,6 @@ if(config_type)
set(config_args -C ${config_type})
endif()
message(" ${config_args}")
-execute_process(COMMAND ${CPackCommand} -G ${CPackGen} ${config_args}
- RESULT_VARIABLE CPack_result
- OUTPUT_VARIABLE CPack_output
- ERROR_VARIABLE CPack_error
- WORKING_DIRECTORY ${CPackComponentsForAll_BINARY_DIR})
-
-if (CPack_result)
- message(FATAL_ERROR "error: CPack execution went wrong!, CPack_output=${CPack_output}, CPack_error=${CPack_error}")
-else (CPack_result)
- message(STATUS "CPack_output=${CPack_output}")
-endif(CPack_result)
if(CPackGen MATCHES "ZIP")
set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.zip")
@@ -63,6 +52,26 @@ if(CPackGen MATCHES "ZIP")
endif (${CPackComponentWay} STREQUAL "AllGroupsInOne")
endif(CPackGen MATCHES "ZIP")
+# clean-up previously CPack generated files
+if(expected_file_mask)
+ file(GLOB expected_file "${expected_file_mask}")
+ if (expected_file)
+ file(REMOVE ${expected_file})
+ endif(expected_file)
+endif(expected_file_mask)
+
+execute_process(COMMAND ${CPackCommand} -G ${CPackGen} ${config_args}
+ RESULT_VARIABLE CPack_result
+ OUTPUT_VARIABLE CPack_output
+ ERROR_VARIABLE CPack_error
+ WORKING_DIRECTORY ${CPackComponentsForAll_BINARY_DIR})
+
+if (CPack_result)
+ message(FATAL_ERROR "error: CPack execution went wrong!, CPack_output=${CPack_output}, CPack_error=${CPack_error}")
+else (CPack_result)
+ message(STATUS "CPack_output=${CPack_output}")
+endif(CPack_result)
+
# Now verify if the number of expected file is OK
# - using expected_file_mask and
# - expected_count