summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-07 14:43:47 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-09 15:29:18 (GMT)
commit882f48e5ba335a1dbc1750c23e6dea5fa92a3adc (patch)
tree7783686bed3456d95538a4770dff27f0e24963bc /Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt
parent318cd37097c724fac13a364fe3beb21055575ae7 (diff)
downloadCMake-882f48e5ba335a1dbc1750c23e6dea5fa92a3adc.zip
CMake-882f48e5ba335a1dbc1750c23e6dea5fa92a3adc.tar.gz
CMake-882f48e5ba335a1dbc1750c23e6dea5fa92a3adc.tar.bz2
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 'Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt')
-rw-r--r--Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt b/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt
new file mode 100644
index 0000000..f6cc978
--- /dev/null
+++ b/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt
@@ -0,0 +1,16 @@
+^CMake Warning \(dev\) at CMP0060-Common.cmake:[0-9]+ \(add_executable\):
+ Policy CMP0060 is not set: Link libraries by full path even in implicit
+ directories. Run "cmake --help-policy CMP0060" for policy details. Use
+ the cmake_policy command to set the policy and suppress this warning.
+
+ Some library files are in directories implicitly searched by the linker
+ when invoked for C:
+
+ .*/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-build/lib/(lib)?CMP0060.(a|lib)
+
+ For compatibility with older versions of CMake, the generated link line
+ will ask the linker to search for these by library name.
+Call Stack \(most recent call first\):
+ CMP0060-WARN-ON.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.$