[cmake-developers] [CMake 0014460]: AC_ARG_VARs ignored in CMAKE_FIND_PACKAGE macro in cmake.m4

Mantis Bug Tracker mantis at public.kitware.com
Fri Oct 4 11:27:16 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14460 
====================================================================== 
Reported By:                Sebastian Freundt
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14460
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-10-04 11:27 EDT
Last Modified:              2013-10-04 11:27 EDT
====================================================================== 
Summary:                    AC_ARG_VARs ignored in CMAKE_FIND_PACKAGE macro in
cmake.m4
Description: 
In cmake.m4:

    31	if test -n "$1[]_$2[]FLAGS"; then

and

    34	if test -n "$1[]_LIBS"; then

are completely the opposite of what should happen.

The logic must be: if <PKG>_CFLAGS is set, then do NOT invoke cmake
--find-package but instead use the user-defined value.
If <PKG>_CFLAGS is NOT set, then DO invoke cmake.


Additional Information: 
One way to fix this quickly is:

-if test -n "$1[]_$2[]FLAGS"; then
+if test -n "$1[]_$2[]FLAGS"; then

-if test -n "$1[]_LIBS"; then
+if test -z "$1[]_LIBS"; then

i.e. to replace test -n by test -z

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-10-04 11:27 Sebastian FreundtNew Issue                                    
======================================================================




More information about the cmake-developers mailing list