diff options
author | Brad King <brad.king@kitware.com> | 2008-03-13 20:35:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-03-13 20:35:39 (GMT) |
commit | bf4cef9d5cb67728e855cd65bafa2a3cde684cfe (patch) | |
tree | 22eacf13e8480a8d9a3fda5c15216b324878243e /Source/cmPolicies.cxx | |
parent | d46ff28ac9465969f9fda862d06a048fa40d72f6 (diff) | |
download | CMake-bf4cef9d5cb67728e855cd65bafa2a3cde684cfe.zip CMake-bf4cef9d5cb67728e855cd65bafa2a3cde684cfe.tar.gz CMake-bf4cef9d5cb67728e855cd65bafa2a3cde684cfe.tar.bz2 |
ENH: Add policy CMP_0004 to require library names to have no leading or trailing whitespace. Replace previous check of CMAKE_BACKWARDS_COMPATIBILITY against version 2.4 with the policy.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r-- | Source/cmPolicies.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 06133bc..ffe4554 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -200,6 +200,22 @@ cmPolicies::cmPolicies() "When all items on the link line have known paths CMake does not check " "this policy so it has no effect.", 2,6,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0004, "CMP0004", + "Libraries linked may not have leading or trailing whitespace.", + "CMake versions 2.4 and below silently removed leading and trailing " + "whitespace from libraries linked with code like\n" + " target_link_libraries(myexe \" A \")\n" + "This could lead to subtle errors in user projects.\n" + "The OLD behavior for this policy is to silently remove leading and " + "trailing whitespace. " + "The NEW behavior for this policy is to diagnose the existence of " + "such whitespace as an error. " + "The setting for this policy used when checking the library names is " + "that in effect when the target is created by an add_executable or " + "add_library command.", + 2,6,0, cmPolicies::WARN); } cmPolicies::~cmPolicies() |