-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make lib and cmake target names the same as repository name, do NOT support cmake install multiple configurations simultaneously #812
Conversation
…nt from the cmake find_package name and library names. It becomes too confusing to the users and it is NOT recommended by package managers such as conan and vcpkg. Also, supporting different targets for ssl and static was not a good idea and source of confusion. The user configures it anyway when using cmake or package managers, hence, deleted those options. Eliminated the generation of different targets for static and ssl and it will be only controlled by cmake options. Only a single type is supported per installation. The library and target names are also changed to the same name as the project `hazelcast-cpp-client`.
Linux test FAILed. |
Windows test FAILed. |
…s is the standard recommended option name https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html Removed all the `BUILD_STATIC_LIB` flags and related documentation. Updated the scripts to work with the latest changes. Minor fixes for the copy ellision warning of std::move statements.
Windows test FAILed. |
Linux test FAILed. |
Windows test FAILed. |
Linux test PASSed. |
CMakeLists.txt
Outdated
@@ -103,66 +93,66 @@ if (WITH_OPENSSL) | |||
endif () | |||
|
|||
|
|||
function(add_hazelcast_library name type) | |||
function(add_hazelcast_library type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess now that we work with a single type of library during the build, we can remove this function and put its contents in the global scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
README.md
Outdated
``` | ||
Build both the shared and static library without SSL support: | ||
Build both the shared library without SSL support: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can delete this example, because it does the same with the default cmake ..
(SSL is off by default).
The above example alone is explanatory enough.
You may also consider removing the section header "1.1.5.2.1" completely, and put the above example under "1.1.5.2".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted the line. Removed the section "1.1.5.2.1".
README.md
Outdated
|
||
The package name depends on the specific library type you want to use. | ||
Options are `hazelcastcxx`, `hazelcastcxx_ssl`, `hazelcastcxx_static`, and `hazelcastcxx_ssl_static`. | ||
target_link_libraries(mytarget PRIVATE hazelcast-cpp-client) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace is missing.
target_link_libraries(mytarget PRIVATE hazelcast-cpp-client) | |
target_link_libraries(mytarget PRIVATE hazelcast-cpp-client::hazelcast-cpp-client) |
README.md
Outdated
@@ -252,18 +252,17 @@ You can provide additional configuration options using the `-DVARIABLE=VALUE` sy | |||
Here are all the options that are supported: | |||
* `WITH_OPENSSL` : Set to `ON` to build the library with SSL support. | |||
This will require [OpenSSL](https://www.openssl.org) to be installed on your system. The default is `OFF`. | |||
* `BUILD_STATIC_LIB` : Set to `ON` or `OFF` depending on whether you want the static library. The default is `OFF`. | |||
* `BUILD_SHARED_LIB` : Set to `ON` or `OFF` depending on whether you want the shared library. The default is `ON`. | |||
* `BUILD_SHARED_LIBS` : Set to `ON` or `OFF` depending on whether you want the shared(ON) or static(OFF) library. The default is `ON`. | |||
* `DISABLE_LOGGING` : Setting this option to `ON` disables logging. The default is `OFF`. | |||
|
|||
##### 1.1.5.2.1 Example Configuration Commands | |||
Build only the static library with SSL support: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since building both is not supported anymore, we may drop "only".
Build only the static library with SSL support: | |
Build the static library with SSL support: |
cmake/config.cmake.in
Outdated
@@ -8,10 +8,10 @@ if (@WITH_OPENSSL@) | |||
find_dependency(OpenSSL) | |||
endif() | |||
|
|||
include(${CMAKE_CURRENT_LIST_DIR}/@name@-targets.cmake) | |||
include(${CMAKE_CURRENT_LIST_DIR}/hazelcast-cpp-client-targets.cmake) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PROJECT_NAME@
can be used in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed.
…indows test so that gtest.dll can be found during running the test executable.
Co-authored-by: yemreinci <18687880+yemreinci@users.noreply.github.com>
Linux test PASSed. |
Windows test PASSed. |
Linux test PASSed. |
1 similar comment
Linux test PASSed. |
Windows test PASSed. |
Windows test PASSed. |
* Added Hazelcast C++ client (https://github.com/hazelcast/hazelcast-cpp-client) port for Hazelcast in-memory database. * Fixed the patch (The generated cmake files destination is corrected.) * Updated the patch. see hazelcast/hazelcast-cpp-client#812 * Disable uwp support. * Added the missing version file for hazelcast-cpp-client. * [hazelcast-cpp-client] Avoid checking in large patch file * Format vcpkg.json * Updated the version for the latest commit using the command `./vcpkg x-add-version --overwrite-version hazelcast-cpp-client`. Co-authored-by: Robert Schumacher <roschuma@microsoft.com> Co-authored-by: NancyLi1013 <lirui09@beyondsoft.com>
It is a problem for users when out library and github name is different from the cmake find_package name and library names. It becomes too confusing to the users and it is NOT recommended by package managers such as conan and vcpkg. Also, supporting different targets for ssl and static was not a good idea and source of confusion. The user configures it anyway when using cmake or package managers, hence, deleted those options.
Eliminated the generation of different targets for static and ssl and it will be only controlled by cmake options. Only a single type is supported per installation. The library and target names are also changed to the same name as the project
hazelcast-cpp-client
.