build: compiler flags handling cleanup
Type: make
Change-Id: I51f30edb91e09525ba116fe3941f2e43f9718da7
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake
index 8038dfa..b399470 100644
--- a/src/cmake/plugin.cmake
+++ b/src/cmake/plugin.cmake
@@ -45,6 +45,7 @@
)
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 @@
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)