Hi CMake Developers,
find attached a proposal to fix #14381. It makes FindPkgConfig stop
processing when a REQUIRED package is not found.

Best,
Christoph

-- 
Nous vivons une époque où les pizzas arrivent plus vite que la police.
[Claude Chabrol, French director]
>From 79faf198bc042ae8a16d851a094ea905df117474 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <[email protected]>
Date: Sat, 22 Mar 2014 08:54:34 +0100
Subject: [PATCH] FindPkgConfig: Stop processing when REQUIRED package not
 found (#14381)

Make the behavior similar to find_package.
---
 Modules/FindPkgConfig.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 286cc23..8327143 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -337,7 +337,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
     if(_pkg_check_modules_failed)
       # fail when requested
       if (${_is_required})
-        message(SEND_ERROR "A required package was not found")
+        message(FATAL_ERROR "A required package was not found")
       endif ()
     else()
       # when we are here, we checked whether requested modules
-- 
1.8.1.4

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to