summaryrefslogtreecommitdiffstats
path: root/src/cmake/plugin.cmake
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-05-10 14:51:44 +0200
committerDamjan Marion <damarion@cisco.com>2021-05-11 12:36:11 +0200
commit0d39cbac6d688fb98d05c32acec699b25a599ead (patch)
tree310b33f4b48b6aa342b0f1d398678b1e78ace81b /src/cmake/plugin.cmake
parent033e6ef52473aa3a87b1fe6db64114258106304b (diff)
build: compiler flags handling cleanup
Type: make Change-Id: I51f30edb91e09525ba116fe3941f2e43f9718da7 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/cmake/plugin.cmake')
-rw-r--r--src/cmake/plugin.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake
index 8038dfa1981..b399470db02 100644
--- a/src/cmake/plugin.cmake
+++ b/src/cmake/plugin.cmake
@@ -45,6 +45,7 @@ macro(add_vpp_plugin name)
)
endforeach()
add_library(${plugin_name} SHARED ${api_includes} ${PLUGIN_SOURCES})
+ target_compile_options(${plugin_name} PUBLIC ${VPP_DEFAULT_MARCH_FLAGS})
set_target_properties(${plugin_name} PROPERTIES NO_SONAME 1)
target_compile_options(${plugin_name} PRIVATE "-fvisibility=hidden")
target_compile_options (${plugin_name} PRIVATE "-ffunction-sections")
@@ -90,6 +91,7 @@ macro(add_vpp_plugin name)
set(test_plugin_name ${name}_test_plugin)
add_library(${test_plugin_name} SHARED ${PLUGIN_API_TEST_SOURCES}
${api_includes})
+ target_compile_options(${test_plugin_name} PUBLIC ${VPP_DEFAULT_MARCH_FLAGS})
set_target_properties(${test_plugin_name} PROPERTIES NO_SONAME 1)
if(NOT VPP_EXTERNAL_PROJECT)
add_dependencies(${test_plugin_name} api_headers)