@@ -51,7 +51,7 @@ function(add_root_dictionary target)
5151 1
5252 A
5353 ""
54- "LINKDEF"
54+ "LINKDEF;EXTRA_PATCH "
5555 "HEADERS;BASENAME" )
5656 if (A_UNPARSED_ARGUMENTS)
5757 message (
@@ -112,7 +112,7 @@ function(add_root_dictionary target)
112112 set (pcmBase ${dictionary} _rdict.pcm)
113113 set (pcmFile ${lib_output_dir} /${pcmBase} )
114114 set (rootmapFile ${lib_output_dir} /lib${basename} .rootmap)
115-
115+
116116 set (O2_TARGETPCMMAP_TARGET "${O2_TARGETPCMMAP_TARGET} ;${target} " CACHE INTERNAL "target/PCM map (target)" )
117117 set (O2_TARGETPCMMAP_PCM "${O2_TARGETPCMMAP_PCM} ;${pcmFile} " CACHE INTERNAL "target/PCM map (pcm)" )
118118
@@ -132,6 +132,7 @@ function(add_root_dictionary target)
132132 set (includeDirs $<TARGET_PROPERTY :${target} ,INCLUDE_DIRECTORIES >)
133133 set (includeDirs $<REMOVE_DUPLICATES :${includeDirs} >)
134134
135+ list (LENGTH A_EXTRA_PATCH hasExtraPatch)
135136 # add a custom command to generate the dictionary using rootcling
136137 # cmake-format: off
137138 add_custom_command (
@@ -146,11 +147,13 @@ function(add_root_dictionary target)
146147 --include_dirs -I$<JOIN:${includeDirs},$<SEMICOLON>-I>
147148 $<$<BOOL :${prop} >:--compile_defs >
148149 $<$<BOOL :${prop} >:-D $<JOIN :${prop} ,$<SEMICOLON >-D >>
150+ $<$<BOOL :${hasExtraPatch} >:--extra -patch >
151+ $<$<BOOL :${hasExtraPatch} >:${CMAKE_CURRENT_LIST_DIR} /${A_EXTRA_PATCH} >
149152 --pcmdeps "$<REMOVE_DUPLICATES :${list_pcm_deps_ ${target} }>"
150153 --headers "${headers} "
151154 COMMAND
152155 ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR} /${pcmBase} ${pcmFile}
153- DEPENDS ${headers} "$<REMOVE_DUPLICATES :${list_pcm_deps_ ${target} }>" )
156+ DEPENDS ${headers} "$<REMOVE_DUPLICATES :${list_pcm_deps_ ${target} }>" ${A_EXTRA_PATCH} )
154157 # cmake-format: on
155158
156159 # add dictionary source to the target sources
0 commit comments