[CMake] Will CMP0003 OLD become deprecated?
Brad King
brad.king at kitware.com
Mon Jan 26 15:14:22 EST 2009
Adolfo Rodríguez wrote:
> I am currently migrating a project to CMake, and have been linking
> targets to project libraries using full paths (i.e., embracing the NEW
> CMP0003 policy of CMake >= 2.6). However, my co-workers are reluctant to
> embrace this because the old CMP0003 policy has not yet yielded
> incorrect results, and because of the extra hassle of specifying full
> paths or link_directories(...) . So, I wanted to ask this list if in the
> (probably distant) future the old behavior will be deprecated. This
> would serve as an extra leverage to support the adoption of the NEW
> CMP0003 style.
Yes, it may become deprecated in the (distant) future. The internal
implementation of the policy mechanism defines a way to remove support
for the OLD behavior of a policy and convert attempts to use it to an error.
If you're looking for arguments:
- Projects that need the OLD behavior technically have a bug.
They specify a library to link without specifying the directory
in which to search for the library.
- Policies are for *compatibility* and are not intended as an API for
selecting between two desirable behaviors. No one should write
*new* code that needs the OLD behavior.
-Brad
More information about the CMake
mailing list