[zeromq-dev] zmq cmake patch

Martin Hurton martin.hurton at gmail.com
Tue Nov 18 10:47:39 CET 2008


On Mon, Nov 17, 2008 at 01:00:43PM -0500, George Neill wrote:
> Martin,
> 
> On Mon, Nov 17, 2008 at 12:48 PM, George Neill <georgen at neillnet.com> wrote:
> > Martin,
> >
> > On Mon, Nov 17, 2008 at 11:31 AM, Martin Hurton <martin.hurton at gmail.com> wrote:
> >> On Sun, Nov 16, 2008 at 09:04:25PM -0600, George Neill wrote:
> >> Hi George,
> >>
> >> Thank you for the patch.
> >> I get the following error when running cmake:
> >> CMake Warning (dev) at cmake/zmq_macros.cmake:24 (add_executable):
> >>
> >> Is it ok? I was building on Debian lenny with cmake version 2.6.
> >
> > Yes, that should be fine.   I will install 2.6 and get any warnings
> > fixed, sorry I did most of the work on the 2.4.8 version.
> 
> I have updated the patch (http://www.bitshed.com/zmq.cmake.diff) , so
> you shouldn't get that warning.

Thanks George.
Actually, I get more warnings this time. See the messages below.

- Martin

CMake Warning (dev) at cmake/zmq_macros.cmake:90 (add_library):
  Policy CMP0002 is not set: Logical target names must be globally unique.
  Run "cmake --help-policy CMP0002" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  zmq/CMakeLists.txt:99 (zmq_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/zmq_macros.cmake:108 (add_executable):
  Policy CMP0002 is not set: Logical target names must be globally unique.
  Run "cmake --help-policy CMP0002" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  zmq/CMakeLists.txt:105 (zmq_add_executable)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/zmq_macros.cmake:90 (add_library):
  Policy CMP0002 is not set: Logical target names must be globally unique.
  Run "cmake --help-policy CMP0002" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  zmq/CMakeLists.txt:46 (zmq_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/zmq_macros.cmake:108 (add_executable):
  Policy CMP0002 is not set: Logical target names must be globally unique.
  Run "cmake --help-policy CMP0002" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  zmq/CMakeLists.txt:52 (zmq_add_executable)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/zmq_macros.cmake:90 (add_library):
  Policy CMP0002 is not set: Logical target names must be globally unique.
  Run "cmake --help-policy CMP0002" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  zmq/CMakeLists.txt:99 (zmq_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/zmq_macros.cmake:108 (add_executable):
  Policy CMP0002 is not set: Logical target names must be globally unique.
  Run "cmake --help-policy CMP0002" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  zmq/CMakeLists.txt:105 (zmq_add_executable)
This warning is for project developers.  Use -Wno-dev to suppress it.

Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/api_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/bp_decoder.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/bp_encoder.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/bp_engine.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/bp_listener.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/demux.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/devpoll_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/dispatcher.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/epoll_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/err.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/ip.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/kqueue_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/locator.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/mux.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/pipe.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/poll_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/select_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/tcp_listener.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/tcp_socket.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/ypollset.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/ysemaphore.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/ysocketpair.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/zmq_server.cpp" is listed multiple times for target "zmq_server".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/api_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/bp_decoder.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/bp_encoder.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/bp_engine.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/bp_listener.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/demux.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/devpoll_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/dispatcher.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/epoll_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/err.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/ip.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/kqueue_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/locator.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/mux.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/pipe.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/poll_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/select_thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/tcp_listener.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/tcp_socket.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/thread.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/ypollset.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/ysemaphore.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/ysocketpair.cpp" is listed multiple times for target "zmq".
Warning: Source file "/home/hurtonm/workspace/zeromq/zmq/zmq_server.cpp" is listed multiple times for target "zmq_server".
CMake Warning (dev) at cmake/zmq_macros.cmake:108 (add_executable):
  Policy CMP0003 should be set before this line.  Add code such as

    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION).  This warning appears
  because target "zmq_server" links to some libraries for which the linker
  must search:

    pthread

  and other libraries with known full path:

    /tmp/zmq-release-build/zmq/libzmq.a

  CMake is adding directories in the second list to the linker search path in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly.  Run "cmake --help-policy CMP0003" for
  more information.
Call Stack (most recent call first):
  zmq/CMakeLists.txt:52 (zmq_add_executable)
  cmake/zmq_macros.cmake:108 (add_executable)
  zmq/CMakeLists.txt:105 (zmq_add_executable)
This warning is for project developers.  Use -Wno-dev to suppress it.


> 
> Thanks,
> George.



More information about the zeromq-dev mailing list