View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
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() | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0040741) Brad King (manager) 2016-03-22 10:16 |
FindLibXml2 uses FIND_PACKAGE_HANDLE_STANDARD_ARGS which sets both the ExactCase_FOUND and the UPPERCASE_FOUND variables. Any idea why that is not causing this to work? |
(0040742) Stephen Kelly (developer) 2016-03-22 10:30 |
The reporter is using CMake 3.2. |
(0040744) David Wagner (reporter) 2016-03-22 11:03 |
Strange that I didn't find 0015412 when I looked for "find_dependency". Will you consider back-porting the fix or not? |
(0040746) Brad King (manager) 2016-03-22 11:12 |
Sorry, we don't maintain the older releases upstream. |
(0041218) Kitware Robot (administrator) 2016-06-10 14:21 |
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. |
Notes |
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 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |