Else scope isn't good and GLOBAL_TARGET_LIST is empty
when testing in closing message macro.
Change-Id: I1a490d4b4c909996763f9c0b58387dae8e44e1b5
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
# Cmake does not maintain targets list before 3.7
# -------------------------------------------------
if(${CMAKE_VERSION} VERSION_LESS 3.7)
- set(GLOBAL_TARGET_LIST ${PROJECT_TARGETS})
+ set(GLOBAL_TARGET_LIST ${PROJECT_TARGETS} CACHE INTERNAL "Hold project targets")
else()
get_property(GLOBAL_TARGET_LIST GLOBAL PROPERTY GlobalTargetList)
endif()