build: declare some CMake variables as advanced
Type: make
Change-Id: I780c1c81a50cb92bc89c05856efd8ef88479c0ab
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake
index 37239f3..5a7d2cd 100644
--- a/src/cmake/library.cmake
+++ b/src/cmake/library.cmake
@@ -136,3 +136,12 @@
# )
endforeach()
endmacro()
+
+macro(vpp_find_library var)
+ find_library(${var} ${ARGN})
+ mark_as_advanced(${var})
+endmacro()
+macro(vpp_find_path var)
+ find_path(${var} ${ARGN})
+ mark_as_advanced(${var})
+endmacro()
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake
index 9b0383f..536ae9c 100644
--- a/src/cmake/plugin.cmake
+++ b/src/cmake/plugin.cmake
@@ -115,6 +115,7 @@
macro(vpp_plugin_find_library plugin var name)
find_library(${var} NAMES ${name} ${ARGN})
+ mark_as_advanced(${var})
if (NOT ${var})
message(WARNING "-- ${name} library not found - ${plugin} plugin disabled")
return()
diff --git a/src/plugins/af_xdp/CMakeLists.txt b/src/plugins/af_xdp/CMakeLists.txt
index a56f250..cbe96aa 100644
--- a/src/plugins/af_xdp/CMakeLists.txt
+++ b/src/plugins/af_xdp/CMakeLists.txt
@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-find_path(BPF_INCLUDE_DIR NAMES bpf/xsk.h)
+vpp_find_path(BPF_INCLUDE_DIR NAMES bpf/xsk.h)
if (NOT BPF_INCLUDE_DIR)
message(WARNING "libbpf headers not found - af_xdp plugin disabled")
return()
diff --git a/src/plugins/crypto_ipsecmb/CMakeLists.txt b/src/plugins/crypto_ipsecmb/CMakeLists.txt
index 59bfe24..981a045 100644
--- a/src/plugins/crypto_ipsecmb/CMakeLists.txt
+++ b/src/plugins/crypto_ipsecmb/CMakeLists.txt
@@ -16,8 +16,8 @@
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})
+vpp_find_path(IPSECMB_INCLUDE_DIR NAMES intel-ipsec-mb.h HINTS ${IPSECMB_INCLUDE_DIR_HINT})
+vpp_find_library(IPSECMB_LIB NAMES libIPSec_MB.a HINTS ${IPSECMB_LIB_DIR_HINT})
if(IPSECMB_INCLUDE_DIR AND IPSECMB_LIB)
diff --git a/src/plugins/dpdk/CMakeLists.txt b/src/plugins/dpdk/CMakeLists.txt
index 8650841..386515e 100644
--- a/src/plugins/dpdk/CMakeLists.txt
+++ b/src/plugins/dpdk/CMakeLists.txt
@@ -25,7 +25,7 @@
##############################################################################
# Find lib and include files
##############################################################################
- find_path(DPDK_INCLUDE_DIR PATH_SUFFIXES dpdk NAMES rte_config.h)
+ vpp_find_path(DPDK_INCLUDE_DIR PATH_SUFFIXES dpdk NAMES rte_config.h)
vpp_plugin_find_library(dpdk DPDK_LIB "libdpdk.a")
if (NOT DPDK_INCLUDE_DIR)
diff --git a/src/plugins/linux-cp/CMakeLists.txt b/src/plugins/linux-cp/CMakeLists.txt
index 6b6ccb3..080f73e 100644
--- a/src/plugins/linux-cp/CMakeLists.txt
+++ b/src/plugins/linux-cp/CMakeLists.txt
@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-find_path(LIBNL3_INCLUDE_DIR NAMES libnl3/netlink/route/link/vlan.h)
+vpp_find_path(LIBNL3_INCLUDE_DIR NAMES libnl3/netlink/route/link/vlan.h)
if (NOT LIBNL3_INCLUDE_DIR)
message(WARNING "-- libnl3 headers not found - linux-cp plugin disabled")
diff --git a/src/plugins/quic/CMakeLists.txt b/src/plugins/quic/CMakeLists.txt
index 044186b..7a121e5 100644
--- a/src/plugins/quic/CMakeLists.txt
+++ b/src/plugins/quic/CMakeLists.txt
@@ -15,11 +15,11 @@
unset(QUIC_LINK_LIBRARIES)
set(EXPECTED_QUICLY_VERSION "0.1.3-vpp")
-find_path(QUICLY_INCLUDE_DIR NAMES quicly.h)
-find_path(PICOTLS_INCLUDE_DIR NAMES picotls.h)
-find_library (QUICLY_LIBRARY NAMES "libquicly.a")
-find_library (PICOTLS_CORE_LIBRARY NAMES "libpicotls-core.a")
-find_library (PICOTLS_OPENSSL_LIBRARY NAMES "libpicotls-openssl.a")
+vpp_find_path(QUICLY_INCLUDE_DIR NAMES quicly.h)
+vpp_find_path(PICOTLS_INCLUDE_DIR NAMES picotls.h)
+vpp_find_library(QUICLY_LIBRARY NAMES "libquicly.a")
+vpp_find_library(PICOTLS_CORE_LIBRARY NAMES "libpicotls-core.a")
+vpp_find_library(PICOTLS_OPENSSL_LIBRARY NAMES "libpicotls-openssl.a")
list(APPEND QUIC_LINK_LIBRARIES
${QUICLY_LIBRARY}
diff --git a/src/plugins/rdma/CMakeLists.txt b/src/plugins/rdma/CMakeLists.txt
index cc104f8..f598ff8 100644
--- a/src/plugins/rdma/CMakeLists.txt
+++ b/src/plugins/rdma/CMakeLists.txt
@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-find_path(IBVERBS_INCLUDE_DIR NAMES infiniband/verbs.h)
+vpp_find_path(IBVERBS_INCLUDE_DIR NAMES infiniband/verbs.h)
if (NOT IBVERBS_INCLUDE_DIR)
message(WARNING "-- rdma headers not found - rdma plugin disabled")
diff --git a/src/plugins/tlsmbedtls/CMakeLists.txt b/src/plugins/tlsmbedtls/CMakeLists.txt
index 96bc97d..1accd7e 100644
--- a/src/plugins/tlsmbedtls/CMakeLists.txt
+++ b/src/plugins/tlsmbedtls/CMakeLists.txt
@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-find_path(MBEDTLS_INCLUDE_DIR NAMES mbedtls/ssl.h)
+vpp_find_path(MBEDTLS_INCLUDE_DIR NAMES mbedtls/ssl.h)
if (NOT MBEDTLS_INCLUDE_DIR)
message(WARNING "-- mbedtls headers not found - tlsmbedtls plugin disabled")
diff --git a/src/plugins/tlspicotls/CMakeLists.txt b/src/plugins/tlspicotls/CMakeLists.txt
index baf4c69..64f6071 100644
--- a/src/plugins/tlspicotls/CMakeLists.txt
+++ b/src/plugins/tlspicotls/CMakeLists.txt
@@ -8,10 +8,10 @@
set(EXPECTED_QUICLY_VERSION "0.1.3-vpp")
-find_path(QUICLY_INCLUDE_DIR NAMES quicly.h)
-find_path (PICOTLS_INCLUDE_DIR NAMES picotls.h)
-find_library (PICOTLS_CORE_LIBRARY NAMES "libpicotls-core.a")
-find_library (PICOTLS_OPENSSL_LIBRARY NAMES "libpicotls-openssl.a")
+vpp_find_path(QUICLY_INCLUDE_DIR NAMES quicly.h)
+vpp_find_path(PICOTLS_INCLUDE_DIR NAMES picotls.h)
+vpp_find_library(PICOTLS_CORE_LIBRARY NAMES "libpicotls-core.a")
+vpp_find_library(PICOTLS_OPENSSL_LIBRARY NAMES "libpicotls-openssl.a")
list (APPEND PICOTLS_LINK_LIBRARIES
${PICOTLS_CORE_LIBRARY}
diff --git a/src/vlib/CMakeLists.txt b/src/vlib/CMakeLists.txt
index 78fe936..c8127fb 100644
--- a/src/vlib/CMakeLists.txt
+++ b/src/vlib/CMakeLists.txt
@@ -49,8 +49,8 @@
# Find lib and include files
##############################################################################
message(STATUS "Looking for libuuid")
-find_path(UUID_INCLUDE_DIR NAMES uuid/uuid.h)
-find_library(UUID_LIB NAMES uuid)
+vpp_find_path(UUID_INCLUDE_DIR NAMES uuid/uuid.h)
+vpp_find_library(UUID_LIB NAMES uuid)
if(UUID_INCLUDE_DIR AND UUID_LIB)
include_directories(${UUID_INCLUDE_DIR})