rm5248 commented on a change in pull request #49:
URL: https://github.com/apache/logging-log4cxx/pull/49#discussion_r554660578



##########
File path: CMakeLists.txt
##########
@@ -103,6 +105,25 @@ foreach(varName HAS_STD_LOCALE  HAS_ODBC  HAS_MBSRTOWCS  
HAS_WCSTOMBS  HAS_FWIDE
   endif()
 endforeach()
 
+#
+# Package and sign if Apache maintainer
+#
+option(APACHE_MAINTAINER "Apache maintainer" OFF)
+if(APACHE_MAINTAINER)
+set(CPACK_SOURCE_PACKAGE_FILE_NAME "apache-log4cxx-${LOG4CXX_RELEASE_VERSION}")
+set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
+set(CPACK_SOURCE_IGNORE_FILES ".git/;build/")
+include(CPack)
+
+add_custom_target( dist 
+    COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} -- package_source
+    COMMAND ${CMAKE_COMMAND} -E sha512sum 
"apache-log4cxx-${LOG4CXX_RELEASE_VERSION}.tar.gz" > 
"apache-log4cxx-${LOG4CXX_RELEASE_VERSION}.tar.gz.sha512"

Review comment:
       The 'sha512sum' is actually a built-in CMake command: 
https://cmake.org/cmake/help/latest/manual/cmake.1.html#run-a-command-line-tool
   
   As for the `gpg`, since that's really only needed for us as Apache 
maintainers, we could either ignore it, or we could make it somewhat more 
robust and have a separate 'sign' target.  This just makes it very easy to do 
it all at once.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to