[cmake-developers] [CMake 0015128]: FindProtobuf issues
Mantis Bug Tracker
mantis at public.kitware.com
Wed Sep 3 18:30:00 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=15128
======================================================================
Reported By: Orion E. Poplawski
Assigned To:
======================================================================
Project: CMake
Issue ID: 15128
Category: Modules
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-09-03 18:29 EDT
Last Modified: 2014-09-03 18:30 EDT
======================================================================
Summary: FindProtobuf issues
Description:
For the Fedora package build of ParaView, we need to use system libraries. I
have been patching ParaView to use the system protobuf library (see
http://www.paraview.org/Bug/view.php?id=13656) for a while now and am updating
to 4.2RC1. With that I am now seeing issues with the interaction with the cmake
FindProtobuf module, due to the fact that it uses the optimize/debug list
convention and add -lpthread to PROTOBUF_LIBRARIES.
Part of the issue is the way it looks for a debug library:
find_library(${name}_LIBRARY
NAMES ${filename}
PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release)
mark_as_advanced(${name}_LIBRARY)
find_library(${name}_LIBRARY_DEBUG
NAMES ${filename}
PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug)
mark_as_advanced(${name}_LIBRARY_DEBUG)
On Linux/Unix this generally finds the same library in the same path. Changing
to:
find_library(${name}_LIBRARY_DEBUG
NAMES ${filename}
PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug NO_DEFAULT_PATH)
mark_as_advanced(${name}_LIBRARY_DEBUG)
helps with that.
I'm not sure what to do with the addition of -lphtreads. Simply removing it may
be the way to go. The paraview protobuf cmake configuration seems to add it to
protobuf_LIB_DEPS.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-09-03 18:29 Orion E. PoplawskiNew Issue
2014-09-03 18:30 Orion E. PoplawskiFile Added: cmake-FindProtobuf.patch
======================================================================
More information about the cmake-developers
mailing list