Skip to content

Commit

Permalink
[cmake] Protect against empty COMPILE_DEFINITIONS in genreflex command
Browse files Browse the repository at this point in the history
This applies the change made to ROOT_GENERATE_DICTIONARY in the
main branch commit 08ab7e0 to GENREFLEX_GENERATE_DICTIONARY.

This commit in conjunction with 08ab7e0 fixes root-project#11312.

See commit 08ab7e0 and issue root-project#11312 for more details on the
issue and solution.
  • Loading branch information
pcanal authored and guitargeek committed Apr 25, 2023
1 parent 5085fe9 commit e845951
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/modules/RootMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ function(REFLEX_GENERATE_DICTIONARY dictionary)

IF(TARGET ${dictionary})
LIST(APPEND include_dirs $<TARGET_PROPERTY:${dictionary},INCLUDE_DIRECTORIES>)
LIST(APPEND definitions $<TARGET_PROPERTY:${dictionary},COMPILE_DEFINITIONS>)
# The COMPILE_DEFINITIONS list might contain empty elements. These are
# removed with the FILTER generator expression, excluding elements that
# match the ^$ regexp (only matches empty strings).
LIST(APPEND definitions "$<FILTER:$<TARGET_PROPERTY:${ARG_MODULE},COMPILE_DEFINITIONS>,EXCLUDE,^$>")
ENDIF()

add_custom_command(
Expand Down

0 comments on commit e845951

Please sign in to comment.