diff options
author | Brad King <brad.king@kitware.com> | 2014-10-10 14:48:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-10-10 14:48:05 (GMT) |
commit | 8bd81981ad2759f2957b464890d3a78ff0675b02 (patch) | |
tree | 754adda3fd49ea167ce978d5557be16976fee67a /Help/release | |
parent | 5ab9aa62fe1e5e1e74bafc69bf0e8d16f118ac9d (diff) | |
download | CMake-8bd81981ad2759f2957b464890d3a78ff0675b02.zip CMake-8bd81981ad2759f2957b464890d3a78ff0675b02.tar.gz CMake-8bd81981ad2759f2957b464890d3a78ff0675b02.tar.bz2 |
Help: Add note about restoring pre-3.0 link libraries genex behavior
Diffstat (limited to 'Help/release')
-rw-r--r-- | Help/release/dev/note-link-libraries-genex.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Help/release/dev/note-link-libraries-genex.rst b/Help/release/dev/note-link-libraries-genex.rst new file mode 100644 index 0000000..acb60eb --- /dev/null +++ b/Help/release/dev/note-link-libraries-genex.rst @@ -0,0 +1,22 @@ +note-link-libraries-genex +------------------------- + +* In CMake 3.0 the :command:`target_link_libraries` command + accidentally began allowing unquoted arguments to use + :manual:`generator expressions <cmake-generator-expressions(7)>` + containing a (``;`` separated) list within them. For example:: + + set(libs B C) + target_link_libraries(A PUBLIC $<BUILD_INTERFACE:${libs}>) + + This is equivalent to writing:: + + target_link_libraries(A PUBLIC $<BUILD_INTERFACE:B C>) + + and was never intended to work. It did not work in CMake 2.8.12. + Such generator expressions should be in quoted arguments:: + + set(libs B C) + target_link_libraries(A PUBLIC "$<BUILD_INTERFACE:${libs}>") + + CMake 3.1 again requires the quotes for this to work correctly. |