summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentVariables.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-23 20:22:38 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-23 20:22:38 (GMT)
commitf27379e3f7291abd0c7f3706cd9e1202052c9889 (patch)
tree36a283459358fe3b53a522c10a6312cfddee2db2 /Source/cmDocumentVariables.cxx
parentae356560a0715fca2f78e1df47723357f3c0c739 (diff)
downloadCMake-f27379e3f7291abd0c7f3706cd9e1202052c9889.zip
CMake-f27379e3f7291abd0c7f3706cd9e1202052c9889.tar.gz
CMake-f27379e3f7291abd0c7f3706cd9e1202052c9889.tar.bz2
ENH: Added CMAKE_LINK_OLD_PATHS compatibility mode for linker search paths.
Diffstat (limited to 'Source/cmDocumentVariables.cxx')
-rw-r--r--Source/cmDocumentVariables.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 33b0a6e..4c33014 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -784,6 +784,24 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This is needed only on very few platforms.", false,
"Variables that Control the Build");
cm->DefineProperty
+ ("CMAKE_LINK_OLD_PATHS", cmProperty::VARIABLE,
+ "Enable linker search path compatibility mode.",
+ "This option enables linking compatibility mode for broken projects. "
+ "There exists code that effectively does\n"
+ " target_link_libraries(myexe /path/to/libA.so -lB)\n"
+ "where -lB is meant to link to /path/to/libB.so. This is broken "
+ "because it specifies -lB without adding \"/path/to\" to the linker "
+ "search path with the link_directories command. With CMake 2.4 and "
+ "below the code worked accidentally because \"/path/to\" would be "
+ "added to the linker search path by its implementation of linking to "
+ "/path/to/libA.so (which passed -L/path/to -lA to the linker). "
+ "This option tells CMake to add the directories containing libraries "
+ "specified with a full path to the linker search path if the link "
+ "line contains any items like -lB. "
+ "The behavior is also enabled if CMAKE_BACKWARDS_COMPATIBILITY is "
+ "set to 2.4 or lower.", false,
+ "Variables that Control the Build");
+ cm->DefineProperty
("CMAKE_USE_RELATIVE_PATHS", cmProperty::VARIABLE,
"Use relative paths (May not work!).",
"If this is set to TRUE, then the CMake will use "