From 4054534cc63009652f2fa54f962b1b4fd318de4b Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 12 Jun 2014 13:25:53 -0400 Subject: [PATCH] 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. --- Help/command/add_library.rst | 5 +++-- Help/manual/cmake-buildsystem.7.rst | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index e93ef53cc..746d524ab 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 fdd1be4f9..e4b58c075 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.