summaryrefslogtreecommitdiff
path: root/Source/cmTarget.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-07 10:43:47 -0400
committerBrad King <brad.king@kitware.com>2015-04-09 11:29:18 -0400
commit882f48e5ba335a1dbc1750c23e6dea5fa92a3adc (patch)
tree7783686bed3456d95538a4770dff27f0e24963bc /Source/cmTarget.h
parent318cd37097c724fac13a364fe3beb21055575ae7 (diff)
downloadcmake-882f48e5ba335a1dbc1750c23e6dea5fa92a3adc.tar.gz
Link libraries by full path even in implicit directories
When CMP0003 was first introduced we wanted to link all libraries by full path. However, some projects had problems on platforms where find_library would find /usr/lib/libfoo.so when the project really wanted to link to /usr/lib/<arch>/libfoo.so and had been working by accident because pre-CMP0003 behavior used -lfoo to link. We first tried to address that in commit v2.6.0~440 (Teach find_library to avoid returning library paths in system directories, 2008-01-23) by returning just "foo" for libraries in implicit link directories. This caused problems for projects expecting find_library to always return a full path. We ended up using the solution in commit v2.6.0~366 (... switch library paths found in implicit link directories to use -l, 2008-01-31). However, the special case for libraries in implicit link directories has also proven problematic and confusing. Introduce policy CMP0060 to switch to linking all libraries by full path even if they are in implicit link directories. Explain in the policy documentation the factors that led to the original approach and now to this approach.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r--Source/cmTarget.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index a4ef9775aa..55bf234b24 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -34,7 +34,8 @@
F(CMP0041) \
F(CMP0042) \
F(CMP0046) \
- F(CMP0052)
+ F(CMP0052) \
+ F(CMP0060)
class cmake;
class cmMakefile;