Build Specification and Usage Requirements (PUBLIC/PRIVATE/INTERFACE)
I request to clarify (add explanation on) the differences between INTERFACE|PUBLIC|PRIVATE
values qualifiers per explanation given here: https://cmake.org/pipermail/cmake/2016-May/063400.html and relevant policies.
I propose to add links referring to to the said explanation into the listed below commands documentation.
Existing docs
These can be used for additional references:
- Transitive Usage Requirements - Gives the best explanation, worth linking from other commands
-
CMake Tutorial: Step 3: Adding Usage Requirements for a Library - Good on
INTERFACE
- Build Specification and Usage Requirements - This one is rather vague.
List of commands
The keywords INTERFACE|PUBLIC|PRIVATE
are used in the following commands (list is not complete):
- install
- target_compile_definitions
- target_compile_features
- target_compile_options
- target_include_directories
- target_link_directories
- target_link_libraries
- target_link_options
- target_precompile_headers
- target_sources
Quick edit
To quickly edit the above list, run in the bash
/zsh
shell:
EDITOR=echo # Replace `echo` by editor name, e.g. kate
readarray -d $'\n' rsts <<<$(fgrep -l 'PRIVATE' ./Help/command/*rst)
$EDITOR ${rsts[@]}"
Edited by hinell