The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15352 
====================================================================== 
Reported By:                Joachim Wuttke
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15352
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-01-14 13:11 EST
Last Modified:              2015-01-14 13:11 EST
====================================================================== 
Summary:                    find_package_handle_standard_args generates
inadequate error message when last item in a list is unavailable
Description: 
Code example:

set (FOO_LIBRARIES ${FOO_LIB_A} ${FOO_LIB_B})
find_package_handle_standard_args (FOO DEFAULT_MSG FOO_LIBRARIES
FOO_INCLUDE_DIR)

If lib A is missing, I get the error message:

CMake Error: The following variables are used in this project, but they are set
to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake
files:
FOO_LIB_A

However, if lib B (or more generally, the last item in FOO_LIBRARIES) is
missing, I get the less informative:

CMake Error at
/usr/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
  Could NOT find Foo (missing: FOO_LIBRARIES)
Call Stack (most recent call first):
  /usr/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343
(_FPHSA_FAILURE_MESSAGE)
  my_cmake_modules/FindFoo.cmake:84 (find_package_handle_standard_args)

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-01-14 13:11 Joachim Wuttke New Issue                                    
======================================================================

-- 

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/mailman/listinfo/cmake-developers

Reply via email to