add_library: Reject shared libraries on platforms that do not support them

Add policy CMP0164 to provide compatibility.

Fixes: #25759
This commit is contained in:
Asit Dhal
2024-03-17 21:15:16 +01:00
committed by Brad King
parent f852f33c69
commit a61c9afdf8
13 changed files with 113 additions and 9 deletions

View File

@@ -84,6 +84,13 @@ See also :prop_sf:`HEADER_FILE_ONLY` on what to do if some sources are
pre-processed, and you want to have the original sources reachable from
within IDE.
.. versionchanged:: 3.30
On platforms that do not support shared libraries, ``add_library``
now fails on calls creating ``SHARED`` libraries instead of
automatically converting them to ``STATIC`` libraries as before.
See policy :policy:`CMP0164`.
Object Libraries
^^^^^^^^^^^^^^^^