MantisBT - CMake
View Issue Details
0014460CMakeCMakepublic2013-10-04 11:272016-06-10 14:31
Sebastian Freundt 
Alex Neundorf 
normalminoralways
closedmoved 
CMake 2.8.8 
 
0014460: AC_ARG_VARs ignored in CMAKE_FIND_PACKAGE macro in cmake.m4
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.
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
No tags attached.
child of 0014676closed Alex Neundorf cmake --find-package summary ticket 
Issue History
2013-10-04 11:27Sebastian FreundtNew Issue
2013-10-04 11:39Brad KingAssigned To => Alex Neundorf
2013-10-04 11:39Brad KingStatusnew => assigned
2014-01-01 12:23Alex NeundorfRelationship addedchild of 0014676
2014-01-01 12:23Alex NeundorfNote Added: 0034892
2014-01-01 12:23Alex NeundorfStatusassigned => backlog
2016-06-10 14:29Kitware RobotNote Added: 0042384
2016-06-10 14:29Kitware RobotStatusbacklog => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0034892)
Alex Neundorf   
2014-01-01 12:23   
I won't work on this in the near future.
(0042384)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.