zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject zookeeper git commit: ZOOKEEPER-3025: cmake broken on windows - make `hashtable` search `include`
Date Tue, 24 Apr 2018 00:26:09 GMT
Repository: zookeeper
Updated Branches:
  refs/heads/master 154f9c536 -> cb6cae91c

ZOOKEEPER-3025: cmake broken on windows - make `hashtable` search `include`

When ZOOKEEPER-2999 removed the directory side-effect of
`include_directories(include)`, and added it as a target-level include
to the `zookeeper` library, this broke the Windows build. It worked on
Linux (where the patch was tested) because `winconfig.h` and is not
included, but on Windows, the `hashtable` library included
`winconfig.h` (found in `include`) but no longer knew where to find
it. The fix is to add `include` to the `hashtable` library's list of
include directories.

Author: Andrew Schwartzmeyer <andrew@schwartzmeyer.com>

Reviewers: phunt@apache.org

Closes #505 from andschwa/ZOOKEEPER-3025

Change-Id: I657f8e234082068fb7adf56dad2d68cbb4bc1d31

Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/cb6cae91
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/cb6cae91
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/cb6cae91

Branch: refs/heads/master
Commit: cb6cae91c71b679d5bbc3fb48bf707fd1bb14493
Parents: 154f9c5
Author: Andrew Schwartzmeyer <andrew@schwartzmeyer.com>
Authored: Mon Apr 23 17:25:44 2018 -0700
Committer: Patrick Hunt <phunt@apache.org>
Committed: Mon Apr 23 17:25:44 2018 -0700

 src/c/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/c/CMakeLists.txt b/src/c/CMakeLists.txt
index b0e0d39..1fd7908 100644
--- a/src/c/CMakeLists.txt
+++ b/src/c/CMakeLists.txt
@@ -153,6 +153,7 @@ configure_file(cmake_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.h)
 # hashtable library
 set(hashtable_sources src/hashtable/hashtable_itr.c src/hashtable/hashtable.c)
 add_library(hashtable STATIC ${hashtable_sources})
+target_include_directories(hashtable PUBLIC include)
 target_link_libraries(hashtable PUBLIC $<$<OR:$<PLATFORM_ID:Linux>,$<PLATFORM_ID:FreeBSD>>:m>)
 # zookeeper library

View raw message