You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pe...@apache.org on 2022/09/01 07:11:25 UTC

[celix] branch feature/bundle_compression_option created (now db8b2f0e)

This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a change to branch feature/bundle_compression_option
in repository https://gitbox.apache.org/repos/asf/celix.git


      at db8b2f0e Add conan option for bundle compression.

This branch includes the following new commits:

     new db8b2f0e Add conan option for bundle compression.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[celix] 01/01: Add conan option for bundle compression.

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch feature/bundle_compression_option
in repository https://gitbox.apache.org/repos/asf/celix.git

commit db8b2f0eda7eb5b070eca6246e2f27f89bd0a646
Author: PengZheng <ho...@gmail.com>
AuthorDate: Thu Sep 1 15:10:21 2022 +0800

    Add conan option for bundle compression.
---
 cmake/cmake_celix/BundlePackaging.cmake | 11 +++++++++--
 conanfile.py                            |  6 ++----
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/cmake/cmake_celix/BundlePackaging.cmake b/cmake/cmake_celix/BundlePackaging.cmake
index 3fc3c452..752ddd62 100644
--- a/cmake/cmake_celix/BundlePackaging.cmake
+++ b/cmake/cmake_celix/BundlePackaging.cmake
@@ -18,8 +18,15 @@
 
 
 set(CELIX_NO_POSTFIX_BUILD_TYPES RelWithDebInfo Release CACHE STRING "The build type used for creating bundle without a build type postfix.")
-set(CELIX_JAR_COMMAND_ARGUMENTS -cfm0 CACHE STRING "Default no compression is applied")
-set(CELIX_ZIP_COMMAND_ARGUMENTS -rq0 CACHE STRING "Default no compression is applied")
+option(CELIX_USE_COMPRESSION_FOR_BUNDLE_ZIPS "Enables bundle compression" TRUE)
+
+if (CELIX_USE_COMPRESSION_FOR_BUNDLE_ZIPS)
+    set(CELIX_JAR_COMMAND_ARGUMENTS -cfm)
+    set(CELIX_ZIP_COMMAND_ARGUMENTS -rq)
+else()
+    set(CELIX_JAR_COMMAND_ARGUMENTS -cfm0)
+    set(CELIX_ZIP_COMMAND_ARGUMENTS -rq0)
+endif ()
 
 
 find_program(JAR_COMMAND jar NO_CMAKE_FIND_ROOT_PATH)
diff --git a/conanfile.py b/conanfile.py
index 8568605e..7ff28047 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -78,8 +78,7 @@ class CelixConan(ConanFile):
         "celix_cxx": [True, False],
         "celix_install_deprecated_api": [True, False],
         "celix_add_deprecated_attributes": [True, False],
-        "celix_jar_command_arguments": ["ANY"],
-        "celix_zip_command_arguments": ["ANY"],
+        "celix_use_compression_for_bundle_zips": [True, False],
     }
     default_options = { 
         "enable_testing": False,
@@ -122,8 +121,7 @@ class CelixConan(ConanFile):
         "celix_cxx": False,
         "celix_install_deprecated_api": False,
         "celix_add_deprecated_attributes": True,
-        "celix_jar_command_arguments": "-cfm",
-        "celix_zip_command_arguments": "-rq",
+        "celix_use_compression_for_bundle_zips": True,
     }
     _cmake = None