[cmake-developers] [CMake 0015795]: pkg_check_modules produces incorrect results depending on contents of CMakeCache.txt
Mantis Bug Tracker
mantis at public.kitware.com
Fri Oct 16 10:41:34 EDT 2015
The following issue has been SUBMITTED.
======================================================================
https://cmake.org/Bug/view.php?id=15795
======================================================================
Reported By: Sam Thursfield
Assigned To:
======================================================================
Project: CMake
Issue ID: 15795
Category: Modules
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-10-16 10:41 EDT
Last Modified: 2015-10-16 10:41 EDT
======================================================================
Summary: pkg_check_modules produces incorrect results
depending on contents of CMakeCache.txt
Description:
I got bitten by a bug involving pkg_check_modules.
If I run cmake, then edit my CMakeLists.txt to change the parameters passed to
pkg_check_modules, and rerun cmake, it ignores the change that I made to
CMakeLists.txt. I needed to delete the CMakeCache.txt file to get the right
results.
This seems like a cache invalidation bug to me -- a change in the parameters
passed to to pkg_check_modules() should cause the cached values to be
invalidated.
I've attached a small script that reproduces the issue.
Steps to Reproduce:
Use attached script. It uses the 'avahi' library as an example, so needs the
avahi-devel or libavahi-dev package (or whatever else your distro calls it) to
be installed. Any two pkg-config modules will trigger the same error.
Output on my machine:
Creating initial CMakeLists.txt
Avahi libs should be: avahi-gobject
AVAHI LIBS: avahi-gobject;avahi-common;avahi-client;avahi-glib;glib-2.0
Updating pkg_check_modules call
Avahi libs should be:
avahi-gobject;avahi-common;avahi-client;avahi-glib;glib-2.0
AVAHI LIBS: avahi-gobject;avahi-common;avahi-client;avahi-glib;glib-2.0
Removing cache and trying again
Avahi libs should be:
avahi-gobject;avahi-common;avahi-client;avahi-glib;glib-2.0
AVAHI LIBS: avahi-gobject;avahi-common;avahi-client;avahi-glib;glib-2.0
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-10-16 10:41 Sam Thursfield New Issue
2015-10-16 10:41 Sam Thursfield File Added: testcase.sh
======================================================================
More information about the cmake-developers
mailing list