Skip to content

Commit

Permalink
Disable querier when ZENOHPICO_FEATURE_QUERY disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Jan 24, 2025
1 parent 0f77d1b commit b5a3fdf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function(add_examples glob mode lib)
if ((${file} MATCHES "^.*liveliness.*$") AND NOT(ZENOHPICO_FEATURE_LIVELINESS))
continue()
endif()
if ((${file} MATCHES "^.*querier.*$") AND NOT(ZENOHPICO_BUILD_WITH_UNSTABLE_API))
if ((${file} MATCHES "^.*querier.*$") AND (NOT(ZENOHPICO_FEATURE_QUERY) OR NOT(ZENOHPICO_BUILD_WITH_UNSTABLE_API)))
continue()
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion include/zenoh/api.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "api/session.hxx"
#include "api/subscriber.hxx"
#include "api/timestamp.hxx"
#if defined(Z_FEATURE_UNSTABLE_API)
#if (defined(ZENOHCXX_ZENOHC) || Z_FEATURE_QUERY == 1) && defined(Z_FEATURE_UNSTABLE_API)
#include "api/querier.hxx"
#endif
#if defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)
Expand Down
2 changes: 1 addition & 1 deletion include/zenoh/api/querier.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#pragma once

#if defined(ZENOHCXX_ZENOHC)
#if (defined(ZENOHCXX_ZENOHC) || Z_FEATURE_QUERY == 1) && defined(Z_FEATURE_UNSTABLE_API)

#include "../detail/closures_concrete.hxx"
#include "base.hxx"
Expand Down
4 changes: 2 additions & 2 deletions include/zenoh/api/session.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "query_consolidation.hxx"
#include "subscriber.hxx"
#include "timestamp.hxx"
#if defined(Z_FEATURE_UNSTABLE_API)
#if (defined(ZENOHCXX_ZENOHC) || Z_FEATURE_QUERY == 1) && defined(Z_FEATURE_UNSTABLE_API)
#include "querier.hxx"
#endif
#if defined(ZENOHCXX_ZENOHC) && defined(Z_FEATURE_SHARED_MEMORY) && defined(Z_FEATURE_UNSTABLE_API)
Expand Down Expand Up @@ -702,7 +702,7 @@ class Session : public Owned<::z_owned_session_t> {
}
#endif

#if defined(Z_FEATURE_UNSTABLE_API)
#if (defined(ZENOHCXX_ZENOHC) || Z_FEATURE_QUERY == 1) && defined(Z_FEATURE_UNSTABLE_API)
/// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future
/// release.
/// @brief Options to be passed when declaring a ``Querier``.
Expand Down

0 comments on commit b5a3fdf

Please sign in to comment.