octeon: native driver for Marvell Octeon SoC
Type: feature
Change-Id: I6898625c4e8854f777407dac3159e4c639a54860
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ee2882b..d13685b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,7 +13,25 @@
cmake_minimum_required(VERSION 3.13)
-set(CMAKE_C_COMPILER_NAMES clang gcc cc)
+if(DEFINED VPP_PLATFORM AND VPP_PLATFORM STREQUAL "default")
+ unset(VPP_PLATFORM)
+ set(VPP_PLATFORM_NAME "default")
+elseif(DEFINED VPP_PLATFORM)
+ set(platform_file ${CMAKE_SOURCE_DIR}/cmake/platform/${VPP_PLATFORM}.cmake)
+ if(NOT EXISTS ${platform_file})
+ message(FATAL_ERROR "unknown platform ${VPP_PLATFORM}")
+ endif()
+ include(${platform_file})
+ set(VPP_PLATFORM_NAME ${VPP_PLATFORM})
+else()
+ set(VPP_PLATFORM_NAME "default")
+endif()
+
+if (DEFINED VPP_PLATFORM_C_COMPILER_NAMES)
+ set(CMAKE_C_COMPILER_NAMES ${VPP_PLATFORM_C_COMPILER_NAME})
+else()
+ set(CMAKE_C_COMPILER_NAMES clang gcc cc)
+endif()
project(vpp C)
@@ -37,6 +55,11 @@
OUTPUT_VARIABLE VPP_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
+
+if (VPP_PLATFORM)
+ set(VPP_VERSION ${VPP_VERSION}-${VPP_PLATFORM_NAME})
+endif()
+
string(REPLACE "-" ";" VPP_LIB_VERSION ${VPP_VERSION})
list(GET VPP_LIB_VERSION 0 VPP_LIB_VERSION)
@@ -183,7 +206,7 @@
endif()
##############################################################################
-# unittest with clang ode coverage
+# unittest with clang code coverage
##############################################################################
if("${CMAKE_VERSION}" VERSION_GREATER_EQUAL "3.13" AND "${CMAKE_C_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
@@ -307,6 +330,7 @@
# print configuration
##############################################################################
message(STATUS "Configuration:")
+pr("VPP platform" ${VPP_PLATFORM_NAME})
pr("VPP version" ${VPP_VERSION})
pr("VPP library version" ${VPP_LIB_VERSION})
pr("GIT toplevel dir" ${VPP_GIT_TOPLEVEL_DIR})