summaryrefslogtreecommitdiffstats
path: root/src/cmake/cpu.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmake/cpu.cmake')
-rw-r--r--src/cmake/cpu.cmake20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/cmake/cpu.cmake b/src/cmake/cpu.cmake
index caeccc050cf..539f7c803a9 100644
--- a/src/cmake/cpu.cmake
+++ b/src/cmake/cpu.cmake
@@ -107,6 +107,8 @@ macro(add_vpp_march_variant v)
endif()
if (VPP_MARCH_VARIANT_${uv})
list(APPEND MARCH_VARIANTS "${v}\;${fs}")
+ else()
+ list(APPEND MARCH_VARIANTS_DISABLED "${v}\;${fs}")
endif()
endif()
endif()
@@ -169,11 +171,25 @@ macro(vpp_library_set_multiarch_sources lib)
cmake_parse_arguments(ARG
""
""
- "SOURCES;DEPENDS"
+ "SOURCES;DEPENDS;FORCE_ON"
${ARGN}
)
- foreach(V ${MARCH_VARIANTS})
+ set(VARIANTS "${MARCH_VARIANTS}")
+
+ if(ARG_FORCE_ON)
+ foreach(F ${ARG_FORCE_ON})
+ foreach(V ${MARCH_VARIANTS_DISABLED})
+ list(GET V 0 VARIANT)
+ if (VARIANT STREQUAL F)
+ list(GET V 1 VARIANT_FLAGS)
+ list(APPEND VARIANTS "${VARIANT}\;${VARIANT_FLAGS}")
+ endif()
+ endforeach()
+ endforeach()
+ endif()
+
+ foreach(V ${VARIANTS})
list(GET V 0 VARIANT)
list(GET V 1 VARIANT_FLAGS)
set(l ${lib}_${VARIANT})