Skip to content
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

Merged
merged 6 commits into from Feb 19, 2021

Conversation

@ihsandemir
Copy link
Collaborator

@ihsandemir ihsandemir commented Feb 15, 2021

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.

…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`.
@ihsandemir ihsandemir added this to the 4.1 milestone Feb 15, 2021
@ihsandemir ihsandemir requested review from yuce, sancar and yemreinci Feb 15, 2021
@ihsandemir ihsandemir self-assigned this Feb 15, 2021
@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 15, 2021

Linux test FAILed.

@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 15, 2021

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.
@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 16, 2021

Windows test FAILed.

@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 16, 2021

Linux test FAILed.

@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 16, 2021

Windows test FAILed.

@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 16, 2021

Linux test PASSed.

ihsandemir added a commit to ihsandemir/vcpkg that referenced this pull request Feb 17, 2021
ihsandemir added a commit to ihsandemir/vcpkg that referenced this pull request Feb 17, 2021
@@ -103,66 +93,66 @@ if (WITH_OPENSSL)
endif ()


function(add_hazelcast_library name type)
function(add_hazelcast_library type)

This comment has been minimized.

@yemreinci

yemreinci Feb 18, 2021
Contributor

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.

This comment has been minimized.

@ihsandemir

ihsandemir Feb 18, 2021
Author Collaborator

Removed.

README.md Outdated
```
Build both the shared and static library without SSL support:
Build both the shared library without SSL support:

This comment has been minimized.

@yemreinci

yemreinci Feb 18, 2021
Contributor

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".

This comment has been minimized.

@ihsandemir

ihsandemir Feb 18, 2021
Author Collaborator

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)

This comment has been minimized.

@yemreinci

yemreinci Feb 18, 2021
Contributor

namespace is missing.

Suggested change
target_link_libraries(mytarget PRIVATE hazelcast-cpp-client)
target_link_libraries(mytarget PRIVATE hazelcast-cpp-client::hazelcast-cpp-client)
README.md Outdated Show resolved Hide resolved
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:

This comment has been minimized.

@yemreinci

yemreinci Feb 18, 2021
Contributor

Since building both is not supported anymore, we may drop "only".

Suggested change
Build only the static library with SSL support:
Build the static library with SSL support:
scripts/do-all-unix.sh Outdated Show resolved Hide resolved
scripts/do-all-windows.bat Outdated Show resolved Hide resolved
@@ -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)

This comment has been minimized.

@yemreinci

yemreinci Feb 18, 2021
Contributor

@PROJECT_NAME@ can be used in this file.

This comment has been minimized.

@ihsandemir

ihsandemir Feb 18, 2021
Author Collaborator

changed.

ihsandemir and others added 3 commits Feb 18, 2021
…indows test so that gtest.dll can be found during running the test executable.
Co-authored-by: yemreinci <18687880+yemreinci@users.noreply.github.com>
@ihsandemir ihsandemir requested review from yemreinci and sancar Feb 18, 2021
@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 18, 2021

Linux test PASSed.

@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 18, 2021

Windows test PASSed.

@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 18, 2021

Linux test PASSed.

1 similar comment
@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 18, 2021

Linux test PASSed.

@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 18, 2021

Windows test PASSed.

@devOpsHazelcast
Copy link
Contributor

@devOpsHazelcast devOpsHazelcast commented Feb 18, 2021

Windows test PASSed.

@ihsandemir ihsandemir merged commit 691238b into hazelcast:master Feb 19, 2021
3 checks passed
3 checks passed
jenkins/linux Build finished.
Details
jenkins/windows Build finished.
Details
license/cla Contributor License Agreement is signed.
Details
@ihsandemir ihsandemir deleted the ihsandemir:fix_cmake_targets branch Feb 19, 2021
ras0219-msft added a commit to microsoft/vcpkg that referenced this pull request Feb 24, 2021
* 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>
@ihsandemir ihsandemir modified the milestones: 4.1, 4.0.1 Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants