Previously error messages produced by parsing of command argument
variable references, such as bad $KEY{VAR} syntax or a bad escape
sequence, did not provide good context information. Errors parsing
arguments inside macro invocations gave no context at all. Furthermore,
some errors such as a missing close curly "${VAR" would be reported but
build files would still be generated.
These changes teach CMake to report errors with good context information
for all command argument parsing problems. Policy CMP0010 is introduced
so that existing projects that built despite such errors will continue
to work.
In the future some policies may be set to REQUIRED_IF_USED or
REQUIRED_ALWAYS. This change clarifies the error messages users receive
when violating the requirements.
This change introduces policy CMP0008 to decide how to treat full path
libraries that do not appear to be valid library file names. Such
libraries worked by accident in the VS IDE and Xcode generators with
CMake 2.4 and below. We support them in CMake 2.6 by introducing this
policy. See policy documentation added by this change for details.
- Policy is WARN by default so projects will build
as they did in 2.4 without user intervention
- Remove CMAKE_LINK_OLD_PATHS variable since it was
never in a release and the policy supercedes it
- Report target creation backtrace in warning message
since policy should be set by that point
- Remove CMP_0001 (no slash in target name) and restore
old CMAKE_BACKWARDS_COMPATIBILITY check for it
- Replace all checks of CMAKE_BACKWARDS_COMPATIBILITY
with cmLocalGenerator::NeedBackwardsCompatibility calls
- Create new CMP_0001 to determine whether or not
CMAKE_BACKWARDS_COMPATIBILITY is used.
(old = use, new = ignore)
- Show CMAKE_BACKWARDS_COMPATIBILITY in cache only when
CMP_0001 is set to OLD or WARN
- Update documentation of cmake_policy and cmake_minimum_required
to indicate their relationship and the 2.4 version boundary
- When no cmake policy version is set in top level makefile
implicitly call cmake_policy(VERSION 2.4) which restores
CMAKE_BACKWARDS_COMPATIBILITY and other 2.4 compatibility
- Fix tests MakeClean and Preprocess to call
cmake_policy(VERSION 2.6) because they depend on new policies