[Cmake-commits] CMake branch, next, updated. v3.4.0-rc1-207-gecaf4ac
James Johnston
johnstonj.public at codenest.com
Thu Oct 8 13:17:29 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via ecaf4ac91fefb0c8a063ff8823137b5685b0a9b1 (commit)
via 81e01f92df657516456d036fd0a99f69410fd07e (commit)
from b222a4ca6f7d84378164e67ce9f81a5e0865eda1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ecaf4ac91fefb0c8a063ff8823137b5685b0a9b1
commit ecaf4ac91fefb0c8a063ff8823137b5685b0a9b1
Merge: b222a4c 81e01f9
Author: James Johnston <johnstonj.public at codenest.com>
AuthorDate: Thu Oct 8 13:17:28 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Oct 8 13:17:28 2015 -0400
Merge topic 'doc-clarify-shared-lib' into next
81e01f92 Help: Clarify that build system requires SHARED libraries to export symbols.
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81e01f92df657516456d036fd0a99f69410fd07e
commit 81e01f92df657516456d036fd0a99f69410fd07e
Author: James Johnston <johnstonj.public at codenest.com>
AuthorDate: Thu Oct 8 17:14:12 2015 +0000
Commit: James Johnston <johnstonj.public at codenest.com>
CommitDate: Thu Oct 8 17:14:12 2015 +0000
Help: Clarify that build system requires SHARED libraries to export symbols.
CMake assumes that a SHARED library compiled on Windows will export a LIB file.
This is not actually the case on Visual C++ if the library does not export any
symbols, and causes incremental builds to break if the user specifies SHARED
anyway. (Users should use MODULE libraries instead.)
diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst
index fe7735c..7a67d61 100644
--- a/Help/command/add_library.rst
+++ b/Help/command/add_library.rst
@@ -36,6 +36,11 @@ property is set to ``ON`` automatically.
A ``SHARED`` library may be marked with the :prop_tgt:`FRAMEWORK`
target property to create an OS X Framework.
+If a library does not export any symbols, it must not be declared as a
+``SHARED`` library to avoid breaking incremental builds on some generators
+and compilers. For example, a Win32 resource DLL or a managed C++/CLI DLL
+that exports no unmanaged symbols would need to be a ``MODULE`` library.
+
By default the library file will be created in the build tree directory
corresponding to the source tree directory in which the command was
invoked. See documentation of the :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY`,
diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst
index 357aae9..154b05b 100644
--- a/Help/manual/cmake-buildsystem.7.rst
+++ b/Help/manual/cmake-buildsystem.7.rst
@@ -80,6 +80,10 @@ regardless of the library type. The ``MODULE`` library type is
dissimilar in that it is generally not linked to -- it is not used in
the right-hand-side of the :command:`target_link_libraries` command.
It is a type which is loaded as a plugin using runtime techniques.
+If the library does not export any unmanaged symbols (e.g. Win32
+resource DLL, C++/CLI DLL), it is required that the library not be a
+``SHARED`` library. Some generators and compilers assume that
+``SHARED`` libraries export at least one symbol.
.. code-block:: cmake
@@ -781,7 +785,8 @@ An *archive* output artifact of a buildsystem target may be:
* On DLL platforms: the import library file (e.g. ``.lib``) of a shared
library target created by the :command:`add_library` command
- with the ``SHARED`` option.
+ with the ``SHARED`` option. This file is only guaranteed to exist if
+ the library exports at least one unmanaged symbol.
* On DLL platforms: the import library file (e.g. ``.lib``) of an
executable target created by the :command:`add_executable` command
-----------------------------------------------------------------------
Summary of changes:
Help/command/add_library.rst | 5 +++++
Help/manual/cmake-buildsystem.7.rst | 7 ++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list