Remove target option when IPSecMB disabled
[vpp.git] / src / plugins / crypto_ipsecmb / CMakeLists.txt
index a6bb8dc..86e33a2 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
+  return()
+endif()
+
 find_path(IPSECMB_INCLUDE_DIR NAMES intel-ipsec-mb.h HINTS ${IPSECMB_INCLUDE_DIR_HINT})
 find_library(IPSECMB_LIB NAMES libIPSec_MB.a HINTS ${IPSECMB_LIB_DIR_HINT})
 
@@ -29,6 +33,7 @@ if(IPSECMB_INCLUDE_DIR AND IPSECMB_LIB)
                ${IPSECMB_LINK_FLAGS}
                )
 
+       target_compile_options(crypto_ipsecmb_plugin PRIVATE "-march=silvermont")
        message(STATUS "Intel IPSecMB found: ${IPSECMB_INCLUDE_DIR}")
 else()
        message(STATUS "Intel IPSecMB not found")