Some Questions:
[1] "The full list of target properties .. is in cmake_properties(7) ..."
In the example:
add_library(Example)
set_target_properties(Example
PROPERTIES
Key Value
Hello World
)
get_target_property(KeyVar Example Key)
get_target_property(HelloVar Example Hello)
message("Key ${KeyVar}")
message("Hello: ${HelloVar}")
Key and Hello
a. Are not in cmake_properties(7).
b. Are not capitalized.
c. Do not follow naming conventions from Tutorial Step3.
[2] The example seems to indicate arbitrary properties can be applied.
a. What effect do these properties have on generated artifacts.
b. What limitations exist.
c. How can they be configured/used.
d. Do the variables maintain their associations (Global, Directories, ...)
[3] What role does cmake_properties(7) variables have in this command.
a. Are the variables used/not used.
b. How can the variables be set.
[4] Can set(<variable> <value>) be used instead of set_target_properties()
[5] What is the syntax of the commands.
a. Are they all:
<statement> ::= <function>'(' <target> 'PROPERTIES' <key_value_pairlist>')';
<key_value_pairlist> ::= <key_value_pairlist> <key_value_pair> | <key_value_pair>;
<key_value_pair> ::= <unquoted> <unquoted>
<unquoted> ::= [A-Za-Z_]+
[6] Is Key a reference to a string.
a. Can ${Key} be used.
b. Is Key case insensitive.
[7] Can you use ${Key} ${${value}} to good effect.
[8] Is value assumed to be a primitive or a reference.
That is, if Key is shorthand for ${Key} what is value.
[9] Is the scope assumed (PUBLIC, PRIVATE, or INTERFACE).
1.a) They are not meaningful properties to CMake. Properties are arbitrary key value pairs. Some keys are meaningful, most are not. Key and Hello are not meaningful, we’re demonstrating the concept of associating key-value pairs with targets.
1.b) They need not be capitalized
1.c) There’s no convention
2.a) None, unless the project chooses to make them meaningful
2.b) Only the normal CMake identifier and string limitations
2.c) As demonstrated, with set_target_property / get_target_property
2.d) Target properties are associated with targets
3.a) None.
3.b) set_target_property
4) Not to set target properties, no
5) Every command has its own convention. The overall grammar of CMake language is given in https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#command-invocations
6) “Key” is a string
6.a) ${Key} would expand a variable named “Key” and use whatever string resulted from that expansion.
6.b) No
7) Unclear what this is asking. That is valid CMake syntax.
8) “Key” is not shorthand for ${Key}.
9) Target properties do not have scopes, they’re just associated with the target.