Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
cd4d2acb
Commit
cd4d2acb
authored
Mar 04, 2008
by
Ken Martin
Browse files
ENH: more policy changes
parent
96ee85d1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/cmCMakeMinimumRequired.cxx
View file @
cd4d2acb
...
...
@@ -121,6 +121,9 @@ bool cmCMakeMinimumRequired
}
}
// set the policy version as well
this
->
Makefile
->
SetPolicyVersion
(
version_string
.
c_str
());
return
true
;
}
Source/cmPolicies.cxx
View file @
cd4d2acb
...
...
@@ -184,7 +184,21 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile *mf,
{
patchVer
=
atoi
(
patch
.
c_str
());
}
// add in the old CMAKE_BACKWARDS_COMPATIBILITY var for old CMake compatibility
if
((
majorVer
==
2
&&
minorVer
<=
4
)
||
majorVer
<
2
)
{
if
(
!
mf
->
GetCacheManager
()
->
GetCacheValue
(
"CMAKE_BACKWARDS_COMPATIBILITY"
))
{
mf
->
AddCacheDefinition
(
"CMAKE_BACKWARDS_COMPATIBILITY"
,
version
,
"For backwards compatibility, what version of CMake commands and "
"syntax should this version of CMake try to support."
,
cmCacheManager
::
STRING
);
}
}
// now loop over all the policies and set them as appropriate
std
::
map
<
cmPolicies
::
PolicyID
,
cmPolicy
*>::
iterator
i
=
this
->
Policies
.
begin
();
...
...
Source/cmake.cxx
View file @
cd4d2acb
...
...
@@ -1899,19 +1899,6 @@ int cmake::ActualConfigure()
cmCacheManager
::
INTERNAL
);
}
// set the default BACKWARDS compatibility to the current version
if
(
!
this
->
CacheManager
->
GetCacheValue
(
"CMAKE_BACKWARDS_COMPATIBILITY"
))
{
char
ver
[
256
];
sprintf
(
ver
,
"%i.%i"
,
cmVersion
::
GetMajorVersion
(),
cmVersion
::
GetMinorVersion
());
this
->
CacheManager
->
AddCacheEntry
(
"CMAKE_BACKWARDS_COMPATIBILITY"
,
ver
,
"For backwards compatibility, what version of CMake commands and "
"syntax should this version of CMake allow."
,
cmCacheManager
::
STRING
);
}
// no generator specified on the command line
if
(
!
this
->
GlobalGenerator
)
{
...
...
@@ -2393,19 +2380,6 @@ int cmake::LoadCache()
return
-
3
;
}
// set the default BACKWARDS compatibility to the current version
if
(
!
this
->
CacheManager
->
GetCacheValue
(
"CMAKE_BACKWARDS_COMPATIBILITY"
))
{
char
ver
[
256
];
sprintf
(
ver
,
"%i.%i"
,
cmVersion
::
GetMajorVersion
(),
cmVersion
::
GetMinorVersion
());
this
->
CacheManager
->
AddCacheEntry
(
"CMAKE_BACKWARDS_COMPATIBILITY"
,
ver
,
"For backwards compatibility, what version of CMake commands and "
"syntax should this version of CMake allow."
,
cmCacheManager
::
STRING
);
}
return
0
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment