Files
bacnet_stack/zephyr/tests/bacnet/abort/CMakeLists.txt
T
Steve Karg 4326128e72 Secure ReadProperty decoding and BACnetActionCommand (#702)
* Refactored and secured BACnetActionCommand codec into bacaction.c module for command object and added to bacapp module encode/decode with define for enabling and pseudo application tag for internal use.

* Simplified bacapp_data_len() and moved into bacdcode module as bacnet_enclosed_data_len() function.

* Secured ReadProperty-REQUEST and -ACK decoding.

* Removed deprecated Keylist_Key() functions from usage.

* Removed pseudo application datatypes from bacapp_data_decode() which only uses primitive application tag encoded values.

* Defined INT_MAX when it is not already defined by compiler or libc.

* Deprecated bacapp_decode_application_data_len() and bacapp_decode_context_data_len() as they are no longer used in any code in the library.

* Added BACnetScale to bacapp module. Improved complex property value decoding. Refactored bacapp_decode_known_property() function.

* Refactored and improved the bacapp_snprintf() function for printing EPICS.

* Fixed Lighting Output WriteProperty to handle known property decoding.
2024-07-25 17:12:08 -05:00

46 lines
1.1 KiB
CMake

# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.13.1)
# Extract module path and names
string(REGEX REPLACE
"/zephyr/tests/[a-zA-Z_/-]*$" ""
BACNET_BASE
${CMAKE_CURRENT_SOURCE_DIR})
string(REGEX REPLACE
"/zephyr/tests/" "/src/"
BACNET_SRC_PATH
${CMAKE_CURRENT_SOURCE_DIR})
string(REGEX REPLACE
"/zephyr/tests/" "/test/"
BACNET_TEST_PATH
${CMAKE_CURRENT_SOURCE_DIR})
get_filename_component(BACNET_NAME ${BACNET_BASE} NAME)
if(BOARD STREQUAL unit_testing)
file(RELATIVE_PATH BACNET_INCLUDE $ENV{ZEPHYR_BASE} ${BACNET_BASE}/src)
list(APPEND INCLUDE ${BACNET_INCLUDE})
list(APPEND SOURCES
${BACNET_SRC_PATH}.c
${BACNET_TEST_PATH}/src/main.c
)
set(CONF_FILE "${CONF_FILE};prj.unit_testing.conf")
find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(${BACNET_NAME})
else()
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(${BACNET_NAME})
target_include_directories(app PRIVATE ${BACNET_BASE}/src)
target_sources(app PRIVATE
${BACNET_TEST_PATH}/src/main.c
)
endif()
add_compile_definitions(
CONFIG_ZTEST_NEW_API
BACNET_STACK_DEPRECATED_DISABLE
)