CMake Config file causes warnings in CMake

Bug #1035938 reported by Sjors Gielen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
insighttoolkit (Ubuntu)
New
Undecided
Unassigned

Bug Description

The file ITKconfig.cmake installed by this package in /usr/lib/InsightToolkit contains the following on line 50-52:

IF("ON")
  SET(ITK_LIBRARIES ....)
ENDIF("ON")

Having "ON" in a conditional statement is invalid CMake syntax and causes the following warning:

CMake Warning (dev) at /usr/lib/InsightToolkit/ITKConfig.cmake:50 (IF):
  given arguments:

    "ON"

  An argument named "ON" appears in a conditional statement. Policy CMP0012
  is not set: if() recognizes numbers and boolean constants. Run "cmake
  --help-policy CMP0012" for policy details. Use the cmake_policy command to
  set the policy and suppress this warning.
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindITK.cmake:48 (FIND_PACKAGE)
  TOOLS/CONVERT_IMA/CMakeLists.txt:11 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.

Please change this to IF(1) or, if necessary, remove the IF altogether.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libinsighttoolkit3-dev 3.20.1-1
ProcVersionSignature: Ubuntu 3.2.0-27.43-generic 3.2.21
Uname: Linux 3.2.0-27-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.0.1-0ubuntu11
Architecture: amd64
Date: Sun Aug 12 21:25:26 2012
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: insighttoolkit
UpgradeStatus: Upgraded to precise on 2012-08-02 (10 days ago)

Revision history for this message
Sjors Gielen (sgielen) wrote :
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hi Sjors, this is an upstream issue, do you mind reporting it upstream?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.