MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015810 | CMake | Modules | public | 2015-10-27 01:29 | 2016-03-07 09:12 |
Reporter | bchretien | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | CMake 3.3.2 | ||||
Target Version | CMake 3.5 | Fixed in Version | CMake 3.5 | ||
Summary | 0015810: FindPkgConfig.cmake: error returned to the user may be wrong when checking for package existence | ||||
Description | In some cases, CMake returns the following error: -- Checking for module 'foo' -- Package 'foo' not found When the actual error returned by pkg-config is actually: Package 'bar', required by 'foo', not found This seems related to https://cmake.org/Bug/view.php?id=14310, [^] however I did not have the exact same problem: CMake does stop with an error, just not the correct one. | ||||
Steps To Reproduce | I used the same example as in https://cmake.org/Bug/view.php?id=14310 [^] CMakeLists.txt ============== cmake_minimum_required(VERSION 2.8) include(FindPkgConfig) pkg_check_modules(FOO REQUIRED foo) foo.pc ====== Name: foo Description: foo Version: 0 Requires: bar Cflags: -I/usr/include/foo Steps ===== # store both files in a directory $ PKG_CONFIG_PATH=. cmake . Expected ======== Failure, explaining that 'foo' was found but `bar` was not. Current ====== Failure, explaining that 'foo' was not found. | ||||
Additional Information | I made a patch that solves this issue. Now, the actual error is forwarded to the user, for instance: -- Checking for module 'foo' -- Package 'bar', required by 'foo', not found For the standard case (i.e. the package was indeed not found), the CMake error was: -- Checking for module 'foo' -- Package 'foo' not found But with this patch, it now prints: -- Checking for module 'foo' -- No package 'foo' found | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | 0001-FindPkgConfig-return-the-actual-error-when-a-package.patch (2,271) 2015-10-27 01:29 https://public.kitware.com/Bug/file/5559/0001-FindPkgConfig-return-the-actual-error-when-a-package.patch 0001-FindPkgConfig-return-the-actual-error-when-a-package2.patch (2,993) 2015-10-27 11:12 https://public.kitware.com/Bug/file/5560/0001-FindPkgConfig-return-the-actual-error-when-a-package2.patch | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2015-10-27 01:29 | bchretien | New Issue | |||
2015-10-27 01:29 | bchretien | File Added: 0001-FindPkgConfig-return-the-actual-error-when-a-package.patch | |||
2015-10-27 09:34 | Brad King | Note Added: 0039681 | |||
2015-10-27 09:49 | bchretien | Note Added: 0039682 | |||
2015-10-27 11:12 | bchretien | File Added: 0001-FindPkgConfig-return-the-actual-error-when-a-package2.patch | |||
2015-10-27 11:13 | bchretien | Note Added: 0039683 | |||
2015-10-28 10:22 | Brad King | Note Added: 0039697 | |||
2015-10-28 10:22 | Brad King | Assigned To | => Brad King | ||
2015-10-28 10:22 | Brad King | Status | new => resolved | ||
2015-10-28 10:22 | Brad King | Resolution | open => fixed | ||
2015-10-28 10:22 | Brad King | Fixed in Version | => CMake 3.5 | ||
2015-10-28 10:22 | Brad King | Target Version | => CMake 3.5 | ||
2015-10-28 10:50 | bchretien | Note Added: 0039698 | |||
2016-03-07 09:12 | Robert Maynard | Note Added: 0040630 | |||
2016-03-07 09:12 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|