Skip to content

Commit d6488f2

Browse files
committed
build: Fix cmake variable naming clash in DPDK compile options
compile_options variable is used in FindSanitizers.cmake as well. So if compile_options is not set in Finddpdk.cmake, then it make get value from FindSanitizers.cmake and break the build.
1 parent 0d1781c commit d6488f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/Finddpdk.cmake

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ if (dpdk_FOUND AND NOT (TARGET dpdk))
153153
if(_warning_supported_volatile)
154154
# include/generic/rte_spinlock.h increments volatiled-qualified type with
155155
# "++". but this is deprecated by GCC, so silence it.
156-
set(compile_options
156+
set(dpdk_compile_options
157157
INTERFACE_COMPILE_OPTIONS "-Wno-volatile")
158158
endif()
159159
if (library_suffix STREQUAL CMAKE_STATIC_LIBRARY_SUFFIX)
@@ -179,7 +179,7 @@ if (dpdk_FOUND AND NOT (TARGET dpdk))
179179
INTERFACE_INCLUDE_DIRECTORIES ${dpdk_INCLUDE_DIR}
180180
INTERFACE_LINK_LIBRARIES "${dpdk_dependencies}"
181181
IMPORTED_OBJECTS ${dpdk_object_path}
182-
${compile_options})
182+
${dpdk_compile_options})
183183
# we include dpdk in seastar already, so no need to expose it with
184184
# dpdk_LIBRARIES
185185
set (dpdk_LIBRARIES "")
@@ -191,6 +191,6 @@ if (dpdk_FOUND AND NOT (TARGET dpdk))
191191
PROPERTIES
192192
INTERFACE_INCLUDE_DIRECTORIES "${dpdk_PC_INCLUDE_DIRS}"
193193
INTERFACE_LINK_LIBRARIES "${_dpdk_libraries};${dpdk_dependencies}"
194-
${compile_options})
194+
${dpdk_compile_options})
195195
endif()
196196
endif ()

0 commit comments

Comments
 (0)