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 4276648a2e50e4e3b977c875108dcdfe7252f496 (commit) via 20f5460288eea238aa6c5d4257df90d7d32f9dae (commit) via a81531817ef26f4e23933274c2317fd698336c04 (commit) via d8319f0fc99fb628cbe33c3cc9169c2bd3a97f40 (commit) via 50dca47106a17fe9a4a929243fd12f84d4f95e79 (commit) via 4054534cc63009652f2fa54f962b1b4fd318de4b (commit) from 015fe828a71558e8369b661d4a0865884bef0de4 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4276648a2e50e4e3b977c875108dcdfe7252f496 commit 4276648a2e50e4e3b977c875108dcdfe7252f496 Merge: 015fe82 20f5460 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jun 12 14:08:33 2014 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Jun 12 14:08:33 2014 -0400 Merge topic 'buildsystem-doc-updates' into next 20f54602 Help: Link to Object Library docs from add_library a8153181 Help: Organize add_library command documentation d8319f0f Help: Update style guide to use section headers for command signatures 50dca471 Help: Organize Binary Targets section of cmake-buildsystem.7 4054534c Help: Mention INTERFACE_SOURCES as settable for INTERFACE libs http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20f5460288eea238aa6c5d4257df90d7d32f9dae commit 20f5460288eea238aa6c5d4257df90d7d32f9dae Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jun 12 13:59:13 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jun 12 13:59:13 2014 -0400 Help: Link to Object Library docs from add_library diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index 18d8fe3..f19b5c0 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -80,8 +80,8 @@ Object Libraries add_library(<name> OBJECT <src>...) -Creates a special "object library" target. An object library compiles -source files but does not archive or link their object files into a +Creates an :ref:`Object Library <Object Libraries>`. An object library +compiles source files but does not archive or link their object files into a library. Instead other targets created by :command:`add_library` or :command:`add_executable` may reference the objects using an expression of the form ``$<TARGET_OBJECTS:objlib>`` as a source, where ``objlib`` is the http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a81531817ef26f4e23933274c2317fd698336c04 commit a81531817ef26f4e23933274c2317fd698336c04 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jun 12 13:57:37 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jun 12 13:59:00 2014 -0400 Help: Organize add_library command documentation Add a section for each library type signature. Add a table of contents at the top for the html builder. diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index 746d524..18d8fe3 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -1,8 +1,15 @@ add_library ----------- +.. only:: html + + .. contents:: + Add a library to the project using the specified source files. +Normal Libraries +^^^^^^^^^^^^^^^^ + :: add_library(<name> [STATIC | SHARED | MODULE] @@ -44,7 +51,8 @@ the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for available expressions. See the :manual:`cmake-buildsystem(7)` manual for more on defining buildsystem properties. --------------------------------------------------------------------------- +Imported Libraries +^^^^^^^^^^^^^^^^^^ :: @@ -65,7 +73,8 @@ variant :prop_tgt:`IMPORTED_LOCATION_<CONFIG>`) which specifies the location of the main library file on disk. See documentation of the ``IMPORTED_*`` and ``INTERFACE_*`` properties for more information. --------------------------------------------------------------------------- +Object Libraries +^^^^^^^^^^^^^^^^ :: @@ -93,7 +102,8 @@ systems may not like targets that have only object files, so consider adding at least one real source file to any target that references ``$<TARGET_OBJECTS:objlib>``. --------------------------------------------------------------------------- +Alias Libraries +^^^^^^^^^^^^^^^ :: @@ -111,7 +121,8 @@ operand of :command:`set_property`, :command:`set_target_properties`, :command:`target_link_libraries` etc. An ``ALIAS`` target may not be installed or exported. --------------------------------------------------------------------------- +Interface Libraries +^^^^^^^^^^^^^^^^^^^ :: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8319f0fc99fb628cbe33c3cc9169c2bd3a97f40 commit d8319f0fc99fb628cbe33c3cc9169c2bd3a97f40 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jun 12 13:54:27 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jun 12 13:57:36 2014 -0400 Help: Update style guide to use section headers for command signatures In order to be able to link to specific command signatures we need to use a section header instead of a horizontal separator. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 9851c12..cd979c9 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -521,14 +521,15 @@ Style: CMake Command Signatures Command signatures should be marked up as plain literal blocks, not as cmake ``code-blocks``. -Signatures are separated from preceding content by a horizontal -line. That is, use: +Signatures are separated from preceding content by a section header. +That is, use: .. code-block:: rst ... preceding paragraph. - --------------------------------------------------------------------- + Normal Libraries + ^^^^^^^^^^^^^^^^ :: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=50dca47106a17fe9a4a929243fd12f84d4f95e79 commit 50dca47106a17fe9a4a929243fd12f84d4f95e79 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jun 12 13:40:34 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jun 12 13:42:01 2014 -0400 Help: Organize Binary Targets section of cmake-buildsystem.7 Add a subsection for Binary Executables just before Binary Library Types. Divide the library section into Normal Libraries and Object Libraries. diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst index e4b58c0..a7402f7 100644 --- a/Help/manual/cmake-buildsystem.7.rst +++ b/Help/manual/cmake-buildsystem.7.rst @@ -19,8 +19,8 @@ and the rules for regeneration in response to change. Binary Targets ============== -Executables and libraries are defined using the :command:`add_library` -and :command:`add_executable` commands. The resulting binary files have +Executables and libraries are defined using the :command:`add_executable` +and :command:`add_library` commands. The resulting binary files have appropriate prefixes, suffixes and extensions for the platform targeted. Dependencies between binary targets are expressed using the :command:`target_link_libraries` command: @@ -37,9 +37,28 @@ is defined as an executable formed by compiling and linking ``zipapp.cpp``. When linking the ``zipapp`` executable, the ``archive`` static library is linked in. +Binary Executables +------------------ + +The :command:`add_executable` command defines an executable target: + +.. code-block:: cmake + + add_executable(mytool mytool.cpp) + +Commands such as :command:`add_custom_command`, which generates rules to be +run at build time can transparently use an :prop_tgt:`EXECUTABLE <TYPE>` +target as a ``COMMAND`` executable. The buildsystem rules will ensure that +the executable is built before attempting to run the command. + Binary Library Types -------------------- +.. _`Normal Libraries`: + +Normal Libraries +^^^^^^^^^^^^^^^^ + By default, the :command:`add_library` command defines a static library, unless a type is specified. A type may be specified when using the command: @@ -66,6 +85,11 @@ It is a type which is loaded as a plugin using runtime techniques. add_library(archive MODULE 7z.cpp) +.. _`Object Libraries`: + +Object Libraries +^^^^^^^^^^^^^^^^ + The ``OBJECT`` library type is also not linked to. It defines a non-archival collection of object files resulting from compiling the given source files. The object files collection can be used as source inputs to other targets: @@ -83,11 +107,6 @@ they may not be installed, exported, or used in the right hand side of :command:`target_link_libraries`. They also may not be used as the ``TARGET`` in a use of the :command:`add_custom_command(TARGET)` command signature. -Commands such as :command:`add_custom_command`, which generates rules to be -run at build time can transparently use an :prop_tgt:`EXECUTABLE <TYPE>` -target as a ``COMMAND`` executable. The buildsystem rules will ensure that -the executable is built before attempting to run the command. - Build Specification and Usage Requirements ========================================== http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4054534cc63009652f2fa54f962b1b4fd318de4b commit 4054534cc63009652f2fa54f962b1b4fd318de4b Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jun 12 13:25:53 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jun 12 13:31:01 2014 -0400 Help: Mention INTERFACE_SOURCES as settable for INTERFACE libs The add_library(INTERFACE) and Interface Libraries documentation list all the INTERFACE_* properties and target_* commands that can be used to define the interface. Add INTERFACE_SOURCES and target_sources() to these lists for completeness. diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index e93ef53..746d524 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -124,8 +124,9 @@ imported. Typically the ``INTERFACE_*`` properties are populated on the interface target using the :command:`set_property`, :command:`target_link_libraries(INTERFACE)`, :command:`target_include_directories(INTERFACE)`, -:command:`target_compile_options(INTERFACE)` -and :command:`target_compile_definitions(INTERFACE)` commands, and then it +:command:`target_compile_options(INTERFACE)`, +:command:`target_compile_definitions(INTERFACE)`, +and :command:`target_sources(INTERFACE)` commands, and then it is used as an argument to :command:`target_link_libraries` like any other target. diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst index fdd1be4..e4b58c0 100644 --- a/Help/manual/cmake-buildsystem.7.rst +++ b/Help/manual/cmake-buildsystem.7.rst @@ -786,11 +786,12 @@ It may specify usage requirements such as :prop_tgt:`INTERFACE_COMPILE_DEFINITIONS`, :prop_tgt:`INTERFACE_COMPILE_OPTIONS`, :prop_tgt:`INTERFACE_LINK_LIBRARIES`, and +:prop_tgt:`INTERFACE_SOURCES`, :prop_tgt:`INTERFACE_POSITION_INDEPENDENT_CODE`. Only the ``INTERFACE`` modes of the :command:`target_include_directories`, :command:`target_compile_definitions`, :command:`target_compile_options`, -and :command:`target_link_libraries` commands may be used with ``INTERFACE`` -libraries. +:command:`target_sources`, and :command:`target_link_libraries` commands +may be used with ``INTERFACE`` libraries. A primary use-case for ``INTERFACE`` libraries is header-only libraries. ----------------------------------------------------------------------- Summary of changes: Help/command/add_library.rst | 28 ++++++++++++++++++-------- Help/manual/cmake-buildsystem.7.rst | 38 ++++++++++++++++++++++++++--------- Help/manual/cmake-developer.7.rst | 7 ++++--- 3 files changed, 53 insertions(+), 20 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits