View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013755 | CMake | Modules | public | 2012-11-28 17:20 | 2012-11-29 03:25 | ||||
Reporter | Nick Hutchinson | ||||||||
Assigned To | Alex Neundorf | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Linux | OS | Ubuntu | OS Version | 12.10 | ||||
Product Version | CMake 2.8.10.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0013755: find_package_handle_standard_args(XX DEFAULT_MSG XX_FOUND) always succeeds | ||||||||
Description | The following CMakeList.txt file always succeeds with "--Found XX: TRUE". It ought not to; XX_FOUND has not been declared anywhere. I would expect find_package_handle_standard_args() to report that XX could not be found, and to set XX_FOUND to false. ~~~~ cmake_minimum_required(VERSION 2.8.8) include (FindPackageHandleStandardArgs) find_package_handle_standard_args(XX DEFAULT_MSG XX_FOUND) | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0031754) Alex Neundorf (developer) 2012-11-29 02:46 |
That's a nice one ;-) This is the cmake code: set(${_NAME_UPPER}_FOUND TRUE) # check if all passed variables are valid foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS}) if(NOT ${_CURRENT_VAR}) set(${_NAME_UPPER}_FOUND FALSE) set(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}") endif() endforeach() So the _FOUND variable is initially set to TRUE, and only set to FALSE if something is missing. But since the _FOUND variable is the only thing which is checked, and this has been preset to TRUE, it is not missing... |
(0031755) Alex Neundorf (developer) 2012-11-29 03:24 |
This is now fixed in next and should be in 2.8.11. |
(0031756) Alex Neundorf (developer) 2012-11-29 03:25 |
...just for adding a comment |
(0031757) Alex Neundorf (developer) 2012-11-29 03:25 |
It is the branch MinorFixFPHSA_13755, containing just this one commit: 4809cad FPHSA: don't succeed if only checking for XX_FOUND (0013755) |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-11-28 17:20 | Nick Hutchinson | New Issue | |
2012-11-29 02:46 | Alex Neundorf | Note Added: 0031754 | |
2012-11-29 02:46 | Alex Neundorf | Assigned To | => Alex Neundorf |
2012-11-29 02:46 | Alex Neundorf | Status | new => confirmed |
2012-11-29 03:24 | Alex Neundorf | Note Added: 0031755 | |
2012-11-29 03:24 | Alex Neundorf | Status | confirmed => closed |
2012-11-29 03:24 | Alex Neundorf | Resolution | open => fixed |
2012-11-29 03:25 | Alex Neundorf | Note Added: 0031756 | |
2012-11-29 03:25 | Alex Neundorf | Status | closed => feedback |
2012-11-29 03:25 | Alex Neundorf | Resolution | fixed => reopened |
2012-11-29 03:25 | Alex Neundorf | Note Added: 0031757 | |
2012-11-29 03:25 | Alex Neundorf | Status | feedback => closed |
2012-11-29 03:25 | Alex Neundorf | Resolution | reopened => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |