Set EXCLUDE_FROM_ALL property on targets in subdirectory if subdirectory is marked as EXCLUDE_FROM_ALL
Currently when you are applying EXCLUDE_FROM_ALL in add_subdirectory() all targets are nicely excluded from ALL target, but the targets are not having the EXCLUDE_FROM_ALL property set. It would be good if this property will be propagated accordingly to the corresponding targets.
Small example would look like:
CMakeLists.txt a.cpp subdir
./subdir:
CMakeLists.txt b.cpp
where A - CMakeLists.txt contains:
project(A)
add_library(${PROJECT_NAME} a.cpp)
add_subdirectory(subdir EXCLUDE_FROM_ALL)
get_target_property(B_EXCLUDE B EXCLUDE_FROM_ALL)
message("**** ${B_EXCLUDE}")
and B - CMakeLists.txt:
project(B)
add_library(${PROJECT_NAME} b.cpp)
This will result B_EXCLUDE-NOTFOUND
to be printed.