[cmake-developers] [CMake 0014381]: Inconsistent behaviour between find_package and pkg_check_modules
Mantis Bug Tracker
mantis at public.kitware.com
Thu Aug 29 03:52:41 EDT 2013
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=14381
======================================================================
Reported By: JussiP
Assigned To:
======================================================================
Project: CMake
Issue ID: 14381
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2013-08-29 03:52 EDT
Last Modified: 2013-08-29 03:52 EDT
======================================================================
Summary: Inconsistent behaviour between find_package and
pkg_check_modules
Description:
Find_package and pkg_check_modules behave differently with regard to the
REQUIRED keyword. Find_package halts immediately with an error, but
pkg_check_modules does not.
The entire point of REQUIRED is to halt the configuration if something can't be
found. Having the user check the return code by themselves is equivalent to not
having the REQUIRED keyword at all.
Please change the behaviour of pkg_check_modules to exit on error when REQUIRED
is defined.
Steps to Reproduce:
Run this:
---
project(depdemo C)
cmake_minimum_required(VERSION 2.8.1)
find_package(PkgConfig REQUIRED)
pkg_check_modules(DEPS REQUIRED notexisting)
message(STATUS "This should never be printed.")
---
The message text is printed even though it should not be.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-08-29 03:52 JussiP New Issue
======================================================================
More information about the cmake-developers
mailing list