MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0014630 | CMake | CMake | public | 2013-12-04 06:29 | 2014-06-02 08:39 |
|
Reporter | breese | |
Assigned To | Rolf Eike Beer | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | unable to reproduce | |
Platform | Ubuntu | OS | Linux | OS Version | 3.11.0-14 |
Product Version | CMake 2.8.11.2 | |
Target Version | | Fixed in Version | | |
|
Summary | 0014630: FindBZip2 finds bzip2 without header file |
Description | The bzip2 package contains the libraries, but not the header files. The header files are located in the libbz2-dev package. If you only have installed the bzip2 package, but not the libbz2-dev package, FindBZip2 will report bzip2 as found and provide the include directory.
The problem is due to an incorrect use of FIND_PACKAGE_HANDLE_STANDARD_ARGS(), which is missing the DEFAULT_MSG argument. The attached patch fixes the problem.
|
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | FindBZip2.diff (594) 2013-12-04 06:30 https://public.kitware.com/Bug/file/5001/FindBZip2.diff
FindBZip2-b.diff (612) 2013-12-05 03:13 https://public.kitware.com/Bug/file/5003/FindBZip2-b.diff |
|
Issue History |
Date Modified | Username | Field | Change |
2013-12-04 06:29 | breese | New Issue | |
2013-12-04 06:30 | breese | File Added: FindBZip2.diff | |
2013-12-04 08:23 | Brad King | Note Added: 0034707 | |
2013-12-04 08:23 | Brad King | Assigned To | => Brad King |
2013-12-04 08:23 | Brad King | Status | new => resolved |
2013-12-04 08:23 | Brad King | Resolution | open => fixed |
2013-12-04 08:23 | Brad King | Fixed in Version | => CMake 3.0 |
2013-12-04 08:23 | Brad King | Target Version | => CMake 3.0 |
2013-12-04 09:31 | Brad King | Assigned To | Brad King => Rolf Eike Beer |
2013-12-04 09:31 | Brad King | Status | resolved => assigned |
2013-12-04 09:31 | Brad King | Resolution | fixed => open |
2013-12-04 09:31 | Brad King | Fixed in Version | CMake 3.0 => |
2013-12-04 11:20 | Brad King | Note Added: 0034710 | |
2013-12-05 03:12 | breese | Note Added: 0034718 | |
2013-12-05 03:13 | breese | File Added: FindBZip2-b.diff | |
2013-12-05 11:00 | Brad King | Note Added: 0034721 | |
2013-12-05 14:51 | Rolf Eike Beer | Note Added: 0034729 | |
2014-01-27 13:52 | Brad King | Status | assigned => resolved |
2014-01-27 13:52 | Brad King | Resolution | open => unable to reproduce |
2014-01-27 13:52 | Brad King | Target Version | CMake 3.0 => |
2014-06-02 08:39 | Robert Maynard | Note Added: 0036095 | |
2014-06-02 08:39 | Robert Maynard | Status | resolved => closed |
Notes |
|
(0034707)
|
Brad King
|
2013-12-04 08:23
|
|
|
|
(0034710)
|
Brad King
|
2013-12-04 11:20
|
|
|
|
(0034718)
|
breese
|
2013-12-05 03:12
|
|
Is the second patch (FindBZip2-b.diff) better? |
|
|
(0034721)
|
Brad King
|
2013-12-05 11:00
|
|
Actually the current FPHSA call looks correct and is the same as in many other modules.
I cannot even reproduce the reported issue:
$ apt-cache policy bzip2
bzip2:
Installed: 1.0.6-5
Candidate: 1.0.6-5
$ apt-cache policy libbz2-dev
libbz2-dev:
Installed: (none)
Candidate: 1.0.6-5
$ cat ../CMakeLists.txt
cmake_minimum_required(VERSION 2.8.12)
project(Issue14630 C)
find_package(BZip2)
foreach(v BZIP2_FOUND BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
message(STATUS "${v}=[${${v}}]")
endforeach()
$ cmake --version
cmake version 2.8.12.1
$ cmake ..
...
-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
-- BZIP2_FOUND=[FALSE]
-- BZIP2_LIBRARIES=[BZIP2_LIBRARY-NOTFOUND]
-- BZIP2_INCLUDE_DIR=[BZIP2_INCLUDE_DIR-NOTFOUND]
...
Even if I fake the library location it still fails on the headers:
$ cmake .. -DBZIP2_LIBRARY_RELEASE=/usr/lib/x86_64-linux-gnu/libz.so
...
-- Could NOT find BZip2 (missing: BZIP2_INCLUDE_DIR)
-- BZIP2_FOUND=[FALSE]
-- BZIP2_LIBRARIES=[/usr/lib/x86_64-linux-gnu/libz.so]
-- BZIP2_INCLUDE_DIR=[BZIP2_INCLUDE_DIR-NOTFOUND]
... |
|
|
(0034729)
|
Rolf Eike Beer
|
2013-12-05 14:51
|
|
This is also the result from my testing: it just works when the header is there or not. So please test again with the example CMakeLists.txt from Brad. |
|
|
(0036095)
|
Robert Maynard
|
2014-06-02 08:39
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|