blob: 1787e877b24644428ddd843240773053dc43ab0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
add_custom_target(target1 ALL)
target_sources(target1 PRIVATE main.cpp)
get_property(actualProp1 TARGET target1 PROPERTY SOURCES)
set(desiredProp1 main.cpp)
if(NOT desiredProp1 STREQUAL actualProp1)
message("source property not set. desired: \"${desiredProp1}\" actual: \"${actualProp1}\"")
endif()
add_custom_target(target2 ALL SOURCES main.cpp)
target_sources(target2 PRIVATE empty_1.cpp empty_2.cpp)
target_sources(target2 PRIVATE empty_3.cpp)
get_property(actualProp2 TARGET target2 PROPERTY SOURCES)
set(desiredProp2 main.cpp empty_1.cpp empty_2.cpp empty_3.cpp)
if (NOT desiredProp2 STREQUAL actualProp2)
message("source property not set. desired: \"${desiredProp2}\" actual: \"${actualProp2}\"")
endif()
|