MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0014310 | CMake | Modules | public | 2013-07-24 20:49 | 2016-06-10 14:31 |
Reporter | Michał Sawicz | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | Linux | OS | Ubuntu | OS Version | 13.10 |
Product Version | CMake 2.8.11.2 | ||||
Target Version | Fixed in Version | ||||
Summary | 0014310: pkg_check_modules(FOO REQUIRED foo) completes even if foo's pkgconfig dependencies failed | ||||
Description | When a .pc file contains a "Required: bar", CMake should fail if the module was REQUIRED and bar wasn't found. pkg-config exits with exit code 1, but CMake proceeds like nothing happened, FOO_FOUND is set to 1, while all the other FOO_* remain empty. This obfuscates missing dependencies and lets the build process continue, failing then due to missing headers / libraries. | ||||
Steps To Reproduce | CMakeLists.txt ============== cmake_minimum_required(VERSION 2.8) include(FindPkgConfig) pkg_check_modules(FOO REQUIRED foo) message("${FOO_FOUND}") message("${FOO_INCLUDE_DIRS}") 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 Current ======= quiet failure | ||||
Additional Information | CMake Output ============ $ PKG_CONFIG_PATH=. cmake . -- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") -- checking for module 'foo' -- found foo, version 0 Package bar was not found in the pkg-config search path. Perhaps you should add the directory containing `bar.pc' to the PKG_CONFIG_PATH environment variable # === repeated multiple times === 1 -- Configuring done -- Generating done -- Build files have been written to: /tmp/tmp | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | cmake-pkgconfig-required.patch (5,060) 2013-11-15 03:43 https://public.kitware.com/Bug/file/4950/cmake-pkgconfig-required.patch | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2013-07-24 20:49 | Michał Sawicz | New Issue | |||
2013-11-15 03:42 | Arnaud Fontaine | Note Added: 0034453 | |||
2013-11-15 03:43 | Arnaud Fontaine | File Added: cmake-pkgconfig-required.patch | |||
2014-02-03 21:33 | Arnaud Fontaine | Note Added: 0035032 | |||
2014-12-16 06:24 | sobczyk | Note Added: 0037466 | |||
2015-10-26 11:35 | Dan Kegel | Note Added: 0039679 | |||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042325 | |||
2016-06-10 14:29 | Kitware Robot | Status | new => resolved | ||
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|