View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014276CMakeCMakepublic2013-07-07 21:162016-06-10 14:31
ReporterPatrick Mihelich 
Assigned ToAlex Neundorf 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSUbuntu LinuxOS Version12.10
Product VersionCMake 2.8.9 
Target VersionFixed in Version 
Summary0014276: cmake --find-package doesn't handle debug/optimized/general keywords
DescriptionCMake find/config modules may return libraries prefixed with "debug", "optimized" or "general" keywords to link different libraries depending on the build type. These are handled specially by target_link_libraries. The --find-package mode treats them as libraries to link against instead.
Steps To ReproduceWith the Ubuntu system install of protobuf:

$ cmake --find-package -DNAME=Protobuf -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=LINK
-rdynamic -loptimized -lprotobuf -ldebug -lprotobuf -ldebug
TagsNo tags attached.
Attached Files

 Relationships
child of 0014676closedAlex Neundorf cmake --find-package summary ticket 

  Notes
(0033512)
Alex Neundorf (developer)
2013-07-08 15:25

Having seen the feedback of this feature so far, I plan to change it so that it supports only find_package() in Config mode.
This will make things more reliable.
But this won't happen for 2.8.12.
(0036729)
Orion E. Poplawski (reporter)
2014-09-03 17:19

Part of the issue seems to be brain dead searching for a debug library in FindProtobuf.cmake:

   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)

   if(NOT ${name}_LIBRARY_DEBUG)
      # There is no debug library
      set(${name}_LIBRARY_DEBUG ${${name}_LIBRARY} PARENT_SCOPE)
      set(${name}_LIBRARIES ${${name}_LIBRARY} PARENT_SCOPE)
   else()
      # There IS a debug library
      set(${name}_LIBRARIES
          optimized ${${name}_LIBRARY}
          debug ${${name}_LIBRARY_DEBUG}
          PARENT_SCOPE
      )
   endif()


That seems very VisualStudio ? specific. On linux/unix it simply finds the same library twice.
(0042314)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2013-07-07 21:16 Patrick Mihelich New Issue
2013-07-08 09:40 Brad King Assigned To => Alex Neundorf
2013-07-08 09:40 Brad King Status new => assigned
2013-07-08 15:25 Alex Neundorf Note Added: 0033512
2013-07-08 15:25 Alex Neundorf Status assigned => backlog
2014-01-01 12:21 Alex Neundorf Relationship added child of 0014676
2014-09-03 17:19 Orion E. Poplawski Note Added: 0036729
2016-06-10 14:29 Kitware Robot Note Added: 0042314
2016-06-10 14:29 Kitware Robot Status backlog => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team