This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  290d48ebc7e3842dc4ddd2dfa0da1025cda00646 (commit)
       via  d9cec8adca37965ee7c0742688b0f1de7edd9173 (commit)
      from  9dc5bd961146332644880e2b949854e13dbd0b8c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=290d48ebc7e3842dc4ddd2dfa0da1025cda00646
commit 290d48ebc7e3842dc4ddd2dfa0da1025cda00646
Merge: 9dc5bd9 d9cec8a
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Sep 20 08:40:55 2016 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Sep 20 08:40:55 2016 -0400

    Merge topic 'cpack-rpm-srpm-package'
    
    d9cec8ad CPack/RPM: Generate source rpm (SRPM) packages on demand

diff --cc Tests/RunCMake/CPack/CPackTestHelpers.cmake
index 5a35acd,d09fafe..7c2c9c6
--- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake
+++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake
@@@ -1,6 -1,72 +1,72 @@@
  cmake_policy(SET CMP0057 NEW)
+ function(run_cpack_test_common_for_merge_ TEST_NAME types build source)
+   if(TEST_TYPE IN_LIST types)
+     set(RunCMake_TEST_NO_CLEAN TRUE)
+     set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${TEST_NAME}-build")
+ 
+      # TODO this should be executed only once per ctest run (not per 
generator)
+     file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+     file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ 
+     if(EXISTS 
"${RunCMake_SOURCE_DIR}/${TEST_TYPE}/${TEST_NAME}-Prerequirements.cmake")
+       
include("${RunCMake_SOURCE_DIR}/${TEST_TYPE}/${TEST_NAME}-Prerequirements.cmake")
+ 
+       set(FOUND_PREREQUIREMENTS false)
+       get_test_prerequirements("FOUND_PREREQUIREMENTS"
+           "${TEST_CONFIG_DIR}/${type}_config.cmake")
+ 
+       # skip the test if prerequirements are not met
+       if(NOT FOUND_PREREQUIREMENTS)
+         message(STATUS "${TEST_NAME} - SKIPPED")
+         return()
+       endif()
+     endif()
+ 
+     # execute cmake
+     set(RunCMake_TEST_OPTIONS "-DGENERATOR_TYPE=${TEST_TYPE}")
+     run_cmake(${TEST_NAME})
+ 
+     # execute optional build step
+     if(build)
+       run_cmake_command(${TEST_NAME}-Build "${CMAKE_COMMAND}" --build 
"${RunCMake_TEST_BINARY_DIR}")
+     endif()
+ 
+     if(source)
+       set(pack_params_ -G ${TEST_TYPE} --config ./CPackSourceConfig.cmake)
+       FILE(APPEND ${RunCMake_TEST_BINARY_DIR}/CPackSourceConfig.cmake
+         "\nset(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS 
\"-DRunCMake_TEST:STRING=${TEST_NAME}\")")
+     else()
+       unset(pack_params_)
+     endif()
+ 
+     # execute cpack
+     execute_process(
+       COMMAND ${CMAKE_CPACK_COMMAND} ${pack_params_}
+       WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}"
+       RESULT_VARIABLE "result_"
+       OUTPUT_FILE "${RunCMake_TEST_BINARY_DIR}/test_output.txt"
+       ERROR_FILE "${RunCMake_TEST_BINARY_DIR}/test_error.txt"
+       )
+ 
+     # verify result
+     run_cmake_command(
+       ${TEST_TYPE}/${TEST_NAME}
+       "${CMAKE_COMMAND}"
+         -DRunCMake_TEST=${TEST_NAME}
+         -DGENERATOR_TYPE=${TEST_TYPE}
+         -DPACKAGING_RESULT=${result_}
+         "-Dsrc_dir=${RunCMake_SOURCE_DIR}"
+         "-Dbin_dir=${RunCMake_TEST_BINARY_DIR}"
+         "-Dconfig_file=${config_file}"
+         -P "${RunCMake_SOURCE_DIR}/VerifyResult.cmake"
+       )
+   endif()
+ endfunction()
+ function(run_cpack_source_test TEST_NAME types)
+   run_cpack_test_common_for_merge_("${TEST_NAME}" "${types}" false true)
+ endfunction()
  
 -function(run_cpack_test TEST_NAME types build)
 +function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX)
    if(TEST_TYPE IN_LIST types)
      set(RunCMake_TEST_NO_CLEAN TRUE)
      set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${TEST_NAME}-build")
diff --cc Tests/RunCMake/CPack/VerifyResult.cmake
index 238cbfd,fc929e3..8bc2a58
--- a/Tests/RunCMake/CPack/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/VerifyResult.cmake
@@@ -8,10 -8,10 +8,10 @@@ file(READ "${bin_dir}/test_error.txt" e
  file(READ "${config_file}" config_file_content)
  
  set(output_error_message
-     "\nCPack output: '${output}'\nCPack error: '${error}';\nconfig file: 
'${config_file_content}'")
+     "\nCPack output: '${output}'\nCPack error: '${error}';\nCPack result: 
'${PACKAGING_RESULT}';\nconfig file: '${config_file_content}'")
  
  # check that expected generated files exist and contain expected content
 -include("${src_dir}/${GENERATOR_TYPE}/${RunCMake_TEST}-ExpectedFiles.cmake")
 
+include("${src_dir}/${GENERATOR_TYPE}/${RunCMake_TEST_FILE_PREFIX}-ExpectedFiles.cmake")
  
  if(NOT EXPECTED_FILES_COUNT EQUAL 0)
    foreach(file_no_ RANGE 1 ${EXPECTED_FILES_COUNT})

-----------------------------------------------------------------------

Summary of changes:
 Help/release/dev/cpack-rpm-srpm-package.rst        |    7 +
 Modules/CPack.cmake                                |    5 +
 Modules/CPackRPM.cmake                             |  227 +++++++++++++++++---
 Tests/RunCMake/CPack/CPackTestHelpers.cmake        |   66 ++++++
 .../CPack/RPM/SOURCE_PACKAGE-ExpectedFiles.cmake   |    5 +
 .../CPack/RPM/SOURCE_PACKAGE-VerifyResult.cmake    |   63 ++++++
 Tests/RunCMake/CPack/RunCMakeTest.cmake            |    1 +
 Tests/RunCMake/CPack/SOURCE_PACKAGE.cmake          |    9 +
 Tests/RunCMake/CPack/VerifyResult.cmake            |    2 +-
 9 files changed, 359 insertions(+), 26 deletions(-)
 create mode 100644 Help/release/dev/cpack-rpm-srpm-package.rst
 create mode 100644 Tests/RunCMake/CPack/RPM/SOURCE_PACKAGE-ExpectedFiles.cmake
 create mode 100644 Tests/RunCMake/CPack/RPM/SOURCE_PACKAGE-VerifyResult.cmake
 create mode 100644 Tests/RunCMake/CPack/SOURCE_PACKAGE.cmake


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to