Skip to content

Commit 5e59fcf

Browse files
committed
Avoid spurious cyclic dependencies
The O2_PCM_DEPS target property should reevaluate correctly when the dependencies change.
1 parent c060a1e commit 5e59fcf

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

cmake/AddRootDictionary.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ function(add_root_dictionary target)
149149
$<$<BOOL:${prop}>:-D$<JOIN:${prop},$<SEMICOLON>-D>>
150150
$<$<BOOL:${hasExtraPatch}>:--extra-patch>
151151
$<$<BOOL:${hasExtraPatch}>:${CMAKE_CURRENT_LIST_DIR}/${A_EXTRA_PATCH}>
152-
--pcmdeps "$<REMOVE_DUPLICATES:${list_pcm_deps_${target}}>"
152+
--pcmdeps "$<REMOVE_DUPLICATES:$<TARGET_PROPERTY:${target},O2_PCM_DEPS>>"
153153
--headers "${headers}"
154154
COMMAND
155155
${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${pcmBase} ${pcmFile}
156-
DEPENDS ${headers} "$<REMOVE_DUPLICATES:${list_pcm_deps_${target}}>" ${A_EXTRA_PATCH})
156+
DEPENDS ${headers} "$<REMOVE_DUPLICATES:$<TARGET_PROPERTY:${target},O2_PCM_DEPS>>" ${A_EXTRA_PATCH})
157157
# cmake-format: on
158158

159159
# add dictionary source to the target sources

cmake/O2SetROOTPCMDependencies.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function(set_root_pcm_dependencies)
3737
endforeach()
3838
endif()
3939
endforeach()
40-
set(list_pcm_deps_${target} "${pcm_dep_list}" CACHE INTERNAL "List of pcm dependencies for ${target}")
40+
set_property(TARGET ${target} PROPERTY O2_PCM_DEPS "${pcm_dep_list}")
4141
endif()
4242
endforeach()
4343
endfunction()

0 commit comments

Comments
 (0)