You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by proller <gi...@git.apache.org> on 2017/09/28 14:46:26 UTC

[GitHub] zookeeper pull request #386: Cmake fixes

GitHub user proller opened a pull request:

    https://github.com/apache/zookeeper/pull/386

    Cmake fixes

    1. decrease cmake version (to allow compile on some old systems)
    2. do not use global include_directories (and auto include when linking to external projects)
    3. replace CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR - it allow compile zookeper added to other project with add_subdirectory()

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ClickHouse-Extras/zookeeper clickhouse_cmake

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/386.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #386
    
----
commit a338479b84dd92c4858d47c5a3a09483abd427b4
Author: proller <pr...@github.com>
Date:   2017-09-28T14:40:38Z

    Cmake fixes:
    1. decrease cmake version (to allow compile on some old systems)
    2. do not use global include_directories (and auto include when linking to external projects)
    3. replace CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR - it allow compile zookeper added to other project with add_subdirectory()

----


---

[GitHub] zookeeper issue #386: Cmake fixes

Posted by proller <gi...@git.apache.org>.
Github user proller commented on the issue:

    https://github.com/apache/zookeeper/pull/386
  
    No. i only test with cmake version 3.5.1
    but it should works even with cmake 2.8


---

[GitHub] zookeeper issue #386: Cmake fixes

Posted by andschwa <gi...@git.apache.org>.
Github user andschwa commented on the issue:

    https://github.com/apache/zookeeper/pull/386
  
    If you've only tested with 3.5, then this should be set to 3.5 until it's tested with lower.
    
    CMake actually does add features in minor patches. It will _probably_ work, but if it doesn't, then someone's gonna complain eventually.


---

[GitHub] zookeeper issue #386: Cmake fixes

Posted by phunt <gi...@git.apache.org>.
Github user phunt commented on the issue:

    https://github.com/apache/zookeeper/pull/386
  
    > someone's gonna complain eventually
    
    to be fair that's probably going to happen regardless given new (followon I mean) patches are unlikely to verify all the versions, esp the old ones that are hard to come by.


---

[GitHub] zookeeper issue #386: Cmake fixes

Posted by phunt <gi...@git.apache.org>.
Github user phunt commented on the issue:

    https://github.com/apache/zookeeper/pull/386
  
    @proller minor issue but please update this PR summary/description to be consistent with our policies (take a look at most of the other PRs) - also see "generate a pr" here https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute


---

[GitHub] zookeeper issue #386: Cmake fixes

Posted by phunt <gi...@git.apache.org>.
Github user phunt commented on the issue:

    https://github.com/apache/zookeeper/pull/386
  
    Tried it on ubuntu 15.04 (via docker run) and it looks like it fails. Min of 3.5 seems reasonable to me unless someone else wants to do more legwork. Thanks!
    
    $ cmake --version
    cmake version 3.0.2
    
    [ 33%] Building C object CMakeFiles/cli.dir/src/cli.c.o
    Linking C executable cli
    /usr/bin/ld: cannot find -lThreads::Threads
    collect2: error: ld returned 1 exit status
    CMakeFiles/cli.dir/build.make:87: recipe for target 'cli' failed
    make[2]: *** [cli] Error 1
    CMakeFiles/Makefile2:61: recipe for target 'CMakeFiles/cli.dir/all' failed
    make[1]: *** [CMakeFiles/cli.dir/all] Error 2
    Makefile:86: recipe for target 'all' failed
    make: *** [all] Error 2
    $ 


---

[GitHub] zookeeper issue #386: Cmake fixes

Posted by phunt <gi...@git.apache.org>.
Github user phunt commented on the issue:

    https://github.com/apache/zookeeper/pull/386
  
    FYI - this is me:
    
    $ cmake --version
    cmake version 3.7.2


---

[GitHub] zookeeper issue #386: Cmake fixes

Posted by phunt <gi...@git.apache.org>.
Github user phunt commented on the issue:

    https://github.com/apache/zookeeper/pull/386
  
    +1, lgtm - tested on Ubuntu 17.04 and everything compiled fine (a number of warnings from the compiler but that might be new settings or more recent gcc?)
    
    @andschwa - you've been working on the cmake support, any review comments?


---

[GitHub] zookeeper issue #386: Cmake fixes

Posted by andschwa <gi...@git.apache.org>.
Github user andschwa commented on the issue:

    https://github.com/apache/zookeeper/pull/386
  
    @phunt Since this hasn't been updated, let me cherry-pick and open a new PR with the correct info.


---

[GitHub] zookeeper pull request #386: Cmake fixes

Posted by phunt <gi...@git.apache.org>.
Github user phunt commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/386#discussion_r141674581
  
    --- Diff: src/c/CMakeLists.txt ---
    @@ -14,14 +14,13 @@
     # See the License for the specific language governing permissions and
     # limitations under the License.
     
    -cmake_minimum_required(VERSION 3.6)
    +cmake_minimum_required(VERSION 3.5)
     
     project(zookeeper VERSION 3.5.3)
    --- End diff --
    
    @andschwa - please note, this is a separate issue from this patch, but something we need to address. Notice that the version is incorrect here - it should be 3.6.0 for master. 
    
    Which brings up another issue - version updates in our source files is currently a manual process, see "update the version" references here: https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToRelease+using+git I believe we will need to add cmake to this list as well.
    
    I also see that at some point the version has not been updated properly. iirc all of the versions should be the upcoming release, not the last one.
    
    Andrew would you mind creating a JIRA/patch to address all of these? Alternately the cmake at a minimum. If anyone has ideas how to do a better job on this perhaps we should consider that as well.


---

[GitHub] zookeeper pull request #386: Cmake fixes

Posted by andschwa <gi...@git.apache.org>.
Github user andschwa commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/386#discussion_r173568056
  
    --- Diff: src/c/CMakeLists.txt ---
    @@ -14,14 +14,13 @@
     # See the License for the specific language governing permissions and
     # limitations under the License.
     
    -cmake_minimum_required(VERSION 3.6)
    +cmake_minimum_required(VERSION 3.5)
     
     project(zookeeper VERSION 3.5.3)
    --- End diff --
    
    Sorry, forgot about this. I'll at least get a patch out that fixes master.


---

[GitHub] zookeeper pull request #386: Cmake fixes

Posted by andschwa <gi...@git.apache.org>.
Github user andschwa commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/386#discussion_r173571281
  
    --- Diff: src/c/CMakeLists.txt ---
    @@ -14,14 +14,13 @@
     # See the License for the specific language governing permissions and
     # limitations under the License.
     
    -cmake_minimum_required(VERSION 3.6)
    +cmake_minimum_required(VERSION 3.5)
     
     project(zookeeper VERSION 3.5.3)
    --- End diff --
    
    @phunt If you could give the `andschwa` Confluence user edit permissions for the ZooKeeper wiki, I can add to that page how to update the CMake version when releasing.


---

[GitHub] zookeeper pull request #386: Cmake fixes

Posted by andschwa <gi...@git.apache.org>.
Github user andschwa commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/386#discussion_r173569107
  
    --- Diff: src/c/CMakeLists.txt ---
    @@ -14,14 +14,13 @@
     # See the License for the specific language governing permissions and
     # limitations under the License.
     
    -cmake_minimum_required(VERSION 3.6)
    +cmake_minimum_required(VERSION 3.5)
     
     project(zookeeper VERSION 3.5.3)
    --- End diff --
    
    https://github.com/apache/zookeeper/pull/484


---