diff options
author | Damjan Marion <damarion@cisco.com> | 2021-05-10 14:51:44 +0200 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2021-05-11 12:36:11 +0200 |
commit | 0d39cbac6d688fb98d05c32acec699b25a599ead (patch) | |
tree | 310b33f4b48b6aa342b0f1d398678b1e78ace81b /src/cmake/library.cmake | |
parent | 033e6ef52473aa3a87b1fe6db64114258106304b (diff) |
build: compiler flags handling cleanup
Type: make
Change-Id: I51f30edb91e09525ba116fe3941f2e43f9718da7
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/cmake/library.cmake')
-rw-r--r-- | src/cmake/library.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake index 5a7d2cdfef7..560b2c97d5c 100644 --- a/src/cmake/library.cmake +++ b/src/cmake/library.cmake @@ -22,6 +22,7 @@ macro(add_vpp_library lib) set (lo ${lib}_objs) add_library(${lo} OBJECT ${ARG_SOURCES}) set_target_properties(${lo} PROPERTIES POSITION_INDEPENDENT_CODE ON) + target_compile_options(${lo} PUBLIC ${VPP_DEFAULT_MARCH_FLAGS}) add_library(${lib} SHARED) target_sources(${lib} PRIVATE $<TARGET_OBJECTS:${lo}>) @@ -118,6 +119,7 @@ macro(add_vpp_test_library lib) get_filename_component(name ${file} NAME_WE) set(test_lib ${lib}_${name}_plugin) add_library(${test_lib} SHARED ${file}_test2.c) + target_compile_options(${test_lib} PUBLIC ${VPP_DEFAULT_MARCH_FLAGS}) if(NOT VPP_EXTERNAL_PROJECT) add_dependencies(${test_lib} api_headers) endif() |