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

pnoltes pushed a commit to branch hotfix/fix_typo_in_celix_framework_utils
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 0a788362731661ad4f263b20458fb64682746a51
Author: Pepijn Noltes <[email protected]>
AuthorDate: Fri Dec 16 17:04:21 2022 +0100

    Fix typo in celix::installBundleSet function and improve Celix cmake 
documentation
---
 cmake/cmake_celix/Generic.cmake                         | 17 +++++++++--------
 documents/cmake_commands/README.md                      | 11 ++++++-----
 .../framework/gtest/src/CelixFrameworkUtilsTestSuite.cc |  4 ++--
 libs/framework/include/celix/FrameworkUtils.h           |  8 ++++----
 4 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/cmake/cmake_celix/Generic.cmake b/cmake/cmake_celix/Generic.cmake
index 1c2c4dae..6f51e258 100644
--- a/cmake/cmake_celix/Generic.cmake
+++ b/cmake/cmake_celix/Generic.cmake
@@ -192,13 +192,14 @@ function(celix_target_embedded_bundles)
 endfunction()
 
 #[[
-Add a compile definition with a set of bundles to a target.
+Add a compile-definition with a set of comma seperated bundles paths to a 
target and also adds the bundles as
+dependency to the target.
 
 ```CMake
 celix_target_bundle_set_definition(<cmake_target>
-    NAME <set_name>
-    [<bundle1> <bundle2>..]
-)
+        NAME <set_name>
+        [<bundle1> <bundle2>..]
+        )
 ```
 
 Example:
@@ -206,11 +207,11 @@ Example:
 celix_target_bundle_set_definition(test_example NAME TEST_BUNDLES Celix::shell 
Celix::shell_tui)
 ```
 
-The compile definition will have the name `${NAME}` and will contain a `,` 
separated list of bundle paths.
-The bundle can be installed using the Celix framework util function 
`celix_framework_utils_installBundleSet` (C)
-or `celix::installBundlesSet` (C++).
+The compile-definition will have the name `${NAME}` and will contain a `,` 
separated list of bundle paths.
+The bundle set can be installed using the Celix framework util function 
`celix_framework_utils_installBundleSet` (C)
+or `celix::installBundleSet` (C++).
 
-Adding a compile definition with a set of bundles can be useful for testing 
purpose.
+Adding a compile-definition with a set of bundles can be useful for testing 
purpose.
 ]]
 function(celix_target_bundle_set_definition)
     list(GET ARGN 0 TARGET_NAME)
diff --git a/documents/cmake_commands/README.md 
b/documents/cmake_commands/README.md
index 03f14a08..3d966a4a 100644
--- a/documents/cmake_commands/README.md
+++ b/documents/cmake_commands/README.md
@@ -665,7 +665,8 @@ The bundles will be embedded using their symbolic name if 
the bundle is a CMake
 extension) if the bundle is a file (absolute path).
 
 ## celix_target_bundle_set_definition
-Add a compile definition with a set of bundles to a target.
+Add a compile-definition with a set of comma seperated bundles paths to a 
target and also adds the bundles as 
+dependency to the target.
 
 ```CMake
 celix_target_bundle_set_definition(<cmake_target>
@@ -679,8 +680,8 @@ Example:
 celix_target_bundle_set_definition(test_example NAME TEST_BUNDLES Celix::shell 
Celix::shell_tui)
 ```
 
-The compile definition will have the name `${NAME}` and will contain a `,` 
separated list of bundle paths.
-The bundle can be installed using the Celix framework util function 
`celix_framework_utils_installBundleSet` (C)
-or `celix::installBundlesSet` (C++).
+The compile-definition will have the name `${NAME}` and will contain a `,` 
separated list of bundle paths.
+The bundle set can be installed using the Celix framework util function 
`celix_framework_utils_installBundleSet` (C)
+or `celix::installBundleSet` (C++).
 
-Adding a compile definition with a set of bundles can be useful for testing 
purpose.
+Adding a compile-definition with a set of bundles can be useful for testing 
purpose.
diff --git a/libs/framework/gtest/src/CelixFrameworkUtilsTestSuite.cc 
b/libs/framework/gtest/src/CelixFrameworkUtilsTestSuite.cc
index 2f69bfc0..94d7cea7 100644
--- a/libs/framework/gtest/src/CelixFrameworkUtilsTestSuite.cc
+++ b/libs/framework/gtest/src/CelixFrameworkUtilsTestSuite.cc
@@ -149,11 +149,11 @@ TEST_F(CelixFrameworkUtilsTestSuite, installBundleSet) {
     EXPECT_EQ(0, ids.size());
 
     EXPECT_EQ(std::string{}, std::string{BUNDLE_EMPTY_TEST_SET});
-    celix::installBundlesSet(*framework, BUNDLE_EMPTY_TEST_SET);
+    celix::installBundleSet(*framework, BUNDLE_EMPTY_TEST_SET);
     ids = framework->getFrameworkBundleContext()->listBundleIds();
     EXPECT_EQ(0, ids.size());
 
-    celix::installBundlesSet(*framework, BUNDLE_TEST_SET);
+    celix::installBundleSet(*framework, BUNDLE_TEST_SET);
     ids = framework->getFrameworkBundleContext()->listBundleIds();
     EXPECT_EQ(3, ids.size());
 }
diff --git a/libs/framework/include/celix/FrameworkUtils.h 
b/libs/framework/include/celix/FrameworkUtils.h
index c864fce0..782f3c5c 100644
--- a/libs/framework/include/celix/FrameworkUtils.h
+++ b/libs/framework/include/celix/FrameworkUtils.h
@@ -89,12 +89,12 @@ namespace celix {
      * @return The number of installed bundles.
      */
 #if __cplusplus >= 201703L //C++17 or higher
-    inline std::size_t installBundlesSet(celix::Framework& framework, 
std::string_view bundlesSet, bool autoStart = true) {
-        return 
celix_framework_utils_installBundleSet(framework.getCFramework(), 
bundlesSet.data(), autoStart);
+    inline std::size_t installBundleSet(celix::Framework& framework, 
std::string_view bundleSet, bool autoStart = true) {
+        return 
celix_framework_utils_installBundleSet(framework.getCFramework(), 
bundleSet.data(), autoStart);
     }
 #else
-    inline std::size_t installBundlesSet(celix::Framework& framework, const 
std::string& bundlesSet, bool autoStart = true) {
-        return 
celix_framework_utils_installBundleSet(framework.getCFramework(), 
bundlesSet.c_str(), autoStart);
+    inline std::size_t installBundleSet(celix::Framework& framework, const 
std::string& bundleSet, bool autoStart = true) {
+        return 
celix_framework_utils_installBundleSet(framework.getCFramework(), 
bundleSet.c_str(), autoStart);
     }
 #endif
 

Reply via email to