[Cmake] CMAKE_BACKWARDS_COMPATABILITY

Ken Martin ken . martin at kitware . com
Thu, 9 Jan 2003 09:31:19 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_004D_01C2B7C1.DF1D0F70
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hello Folks,

 

A little while ago I introduced a change in how CMake handles backwards
compatibility. In version 1.4 CMake would by default allow all old
commands to be used. Only when you did CMAKE_MINIMUM_REQUIRED(VERSION
1.4) would it become strict. The problem with this approach was that
people would write CMakeList files not knowing that they were using old
deprecated commands. In CMake 1.6 we have changed the approach so that
by default CMake is strict and doesn't allow old commands. It places a
variable in the cache called CMAKE_BACKWARDS_COMPATABILITY which
defaults to the current version of CMake. If a CMakeList file uses an
old command a nice warning (or error depending on how old it is) appears
indicating what to do to fix the problem. You can either update the
CMakeLists.txt file or just set the value of
CMAKE_BACKWARDS_COMPATABILITY to the version specified in the warning
message. On the good side the commands that were in CMake 1.4 are all in
CMake 1.6. I don't think we had to deprecate any commands in 1.6. Some
variables changed which has caused some issues but the actual commands
seem to be becoming more stable.

 

Thanks

Ken

 

Ken Martin, PhD

Kitware Inc.

518 371 3971 x101

469 Clifton Corporate Pkwy

Clifton Park NY 12065

 


------=_NextPart_000_004D_01C2B7C1.DF1D0F70
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">

<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hello Folks,</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>A little while ago I introduced a change in how CMake =
handles
backwards compatibility. In version 1.4 CMake would by default allow all =
old
commands to be used. Only when you did CMAKE_MINIMUM_REQUIRED(VERSION =
1.4)
would it become strict. The problem with this approach was that people =
would
write CMakeList files not knowing that they were using old deprecated =
commands.
In CMake 1.6 we have changed the approach so that by default CMake is =
strict
and doesn&#8217;t allow old commands. It places a variable in the cache =
called
CMAKE_BACKWARDS_COMPATABILITY which defaults to the current version of =
CMake.
If a CMakeList file uses an old command a nice warning (or error =
depending on
how old it is) appears indicating what to do to fix the problem. You can =
either
update the CMakeLists.txt file or just set the value of
CMAKE_BACKWARDS_COMPATABILITY to the version specified in the warning =
message. On
the good side the commands that were in CMake 1.4 are all in CMake 1.6. =
I don&#8217;t
think we had to deprecate any commands in 1.6. Some variables changed =
which has
caused some issues but the actual commands seem to be becoming more =
stable.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Ken</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
 font-family:Arial'>Ken Martin</span></font><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>, PhD</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
 font-family:Arial'>Kitware</span></font><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'> Inc.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>518 371 3971 x101</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>469 </span></font><font size=3D2 face=3DArial><span
  =
style=3D'font-size:10.0pt;font-family:Arial'>Clifton</span></font><font =
size=3D2
face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'> =
Corporate Pkwy</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
  font-family:Arial'>Clifton Park</span></font><font size=3D2 =
face=3DArial><span
 style=3D'font-size:10.0pt;font-family:Arial'> </span></font><font =
size=3D2
  face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'>NY</span></font><font
 size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'> </span></font><font
  size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'>12065</span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;</span></font></p>

</div>

</body>

</html>

------=_NextPart_000_004D_01C2B7C1.DF1D0F70--