diff options
author | Damjan Marion <damarion@cisco.com> | 2018-09-03 12:30:36 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-09-03 16:51:40 +0000 |
commit | 4dffd1c9988020619caff9b8d3b350e7f79e0398 (patch) | |
tree | 58d6b48f3925e815b68dfe04d3946c80ad1c24a1 /src/CMakeLists.txt | |
parent | ea5b5be4eeb0f4cd80cb466bd6e31cad33c57960 (diff) |
Compile vppinfra on macOS
Add missing calls to clib_mem_init to vppinfra test codes.
Change-Id: I53ffc6fc287d1a378065bb86c18b6e995ecdb775
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 11f2be90d9f..53cb185f1ae 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -61,7 +61,6 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "vpp") set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) -find_package(OpenSSL REQUIRED) include(cmake/memfd.cmake) include(cmake/api.cmake) @@ -72,11 +71,18 @@ include(cmake/plugin.cmake) ############################################################################## # subdirs - order matters ############################################################################## -foreach( - DIR - vppinfra svm vlib vlibmemory vlibapi vnet vpp vat vcl plugins - vpp-api tools/vppapigen tools/g2 tools/elftool tools/perftool -) +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + find_package(OpenSSL REQUIRED) + set(SUBDIRS + vppinfra svm vlib vlibmemory vlibapi vnet vpp vat vcl plugins + vpp-api tools/vppapigen tools/g2 tools/elftool tools/perftool) +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + set(SUBDIRS vppinfra) +else() + message(FATAL_ERROR "Unsupported system: ${CMAKE_SYSTEM_NAME}") +endif() + +foreach(DIR ${SUBDIRS}) add_subdirectory(${DIR}) endforeach() |