MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0016028 | CMake | Modules | public | 2016-03-22 06:54 | 2016-06-10 14:21 | |||||
Reporter | David Wagner | |||||||||
Assigned To | Stephen Kelly | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | |||||
Status | closed | Resolution | fixed | |||||||
Platform | OS | Linux | OS Version | Ubuntu | ||||||
Product Version | CMake 3.2.2 | |||||||||
Target Version | Fixed in Version | CMake 3.3 | ||||||||
Summary | 0016028: find_dependency not looking for the correct FOUND variable | |||||||||
Description | find_package(Xyz) may set either XYZ_FOUND (the default) or Xyz_FOUND (if overriden by the called) but find_dependency will only look for Xyz_FOUND. This means that calling, for instance, "find_dependency(LibXml2)" will always fail because upon finding the package, the LIBXML2_FOUND variable is set. See a patch below. If you'd prefer, I can submit it on github. --- /usr/share/cmake-3.2/Modules/CMakeFindDependencyMacro.cmake 2015-04-13 19:09:00.000000000 +0200 +++ cmake/CMakeFindDependencyMacro.cmake 2016-03-22 11:24:08.959963959 +0100 @@ -72,7 +72,8 @@ set_property(GLOBAL PROPERTY _CMAKE_${dep}_TRANSITIVE_DEPENDENCY TRUE) endif() - if (NOT ${dep}_FOUND) + string(TOUPPER ${dep} DEP) + if (NOT ${DEP}_FOUND AND NOT ${dep}_FOUND) set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency ${dep} could not be found.") set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False) return() | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2016-03-22 06:54 | David Wagner | New Issue | ||||||||
2016-03-22 10:16 | Brad King | Note Added: 0040741 | ||||||||
2016-03-22 10:29 | Stephen Kelly | Relationship added | duplicate of 0015412 | |||||||
2016-03-22 10:30 | Stephen Kelly | Note Added: 0040742 | ||||||||
2016-03-22 10:30 | Stephen Kelly | Status | new => resolved | |||||||
2016-03-22 10:30 | Stephen Kelly | Fixed in Version | => CMake 3.3 | |||||||
2016-03-22 10:30 | Stephen Kelly | Resolution | open => fixed | |||||||
2016-03-22 10:30 | Stephen Kelly | Assigned To | => Stephen Kelly | |||||||
2016-03-22 11:03 | David Wagner | Note Added: 0040744 | ||||||||
2016-03-22 11:12 | Brad King | Note Added: 0040746 | ||||||||
2016-06-10 14:21 | Kitware Robot | Note Added: 0041218 | ||||||||
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|