mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-04-10 02:21:58 +02:00
cmake: Disable http-api tests if library not available.
This commit is contained in:
parent
a487cd4f8f
commit
b3b4d77ef3
|
|
@ -119,6 +119,8 @@ if(WITH_HTTP_API)
|
|||
if(HTTP_API_DIR)
|
||||
target_compile_definitions(mosquitto PRIVATE "HTTP_API_DIR=\"${HTTP_API_DIR}\"")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "microhttpd not found, disabling WITH_HTTP_API")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ add_subdirectory(c)
|
|||
|
||||
file(GLOB PY_TEST_FILES [0-9][0-9]-*.py)
|
||||
file(GLOB PY_PERSIST_TEST_FILES 15-*.py)
|
||||
file(GLOB PY_HTTP_API_TEST_FILES 22-*.py)
|
||||
|
||||
list(APPEND PY_TEST_FILES "${CMAKE_CURRENT_SOURCE_DIR}/msg_sequence_test.py")
|
||||
|
||||
|
|
@ -18,6 +19,13 @@ set(EXCLUDE_LIST
|
|||
08-ssl-bridge-helper
|
||||
)
|
||||
|
||||
if(NOT MICROHTTPD_LIBRARY)
|
||||
foreach(PY_HTTP_API_TEST_FILE ${PY_HTTP_API_TEST_FILES})
|
||||
get_filename_component(PY_HTTP_API_TEST_NAME ${PY_HTTP_API_TEST_FILE} NAME_WE)
|
||||
list(APPEND EXCLUDE_LIST ${PY_HTTP_API_TEST_NAME})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
foreach(PY_PERSIST_TEST_FILE ${PY_PERSIST_TEST_FILES})
|
||||
get_filename_component(PY_PERSIST_TEST_NAME ${PY_PERSIST_TEST_FILE} NAME_WE)
|
||||
list(APPEND EXCLUDE_LIST ${PY_PERSIST_TEST_NAME})
|
||||
|
|
|
|||
Loading…
Reference in a new issue