zephyr/subsys/testsuite/ztest/CMakeLists.txt
Yuval Peress a7ceba3710 testing: add zephyr/ prefix to testing include path
Continuation of issue #41543 to add prefix scope for Zephyr's include
files.

Signed-off-by: Yuval Peress <peress@google.com>
2022-06-29 06:04:32 -04:00

29 lines
1.1 KiB
CMake

# SPDX-License-Identifier: Apache-2.0
zephyr_include_directories(
${ZEPHYR_BASE}/subsys/testsuite/include
${ZEPHYR_BASE}/subsys/testsuite/ztest/include
)
zephyr_include_directories_ifdef(
CONFIG_LEGACY_INCLUDE_PATH ${ZEPHYR_BASE}/subsys/testsuite/include/zephyr)
zephyr_include_directories_ifdef(
CONFIG_LEGACY_INCLUDE_PATH ${ZEPHYR_BASE}/subsys/testsuite/ztest/include/zephyr)
if(DEFINED TC_RUNID)
zephyr_compile_definitions(TC_RUNID=${TC_RUNID})
endif()
zephyr_library()
zephyr_library_sources_ifndef(CONFIG_ZTEST_NEW_API src/ztest.c)
zephyr_library_sources_ifdef(CONFIG_ZTEST_NEW_API src/ztest_new.c)
zephyr_library_sources( src/ztest_error_hook.c)
zephyr_library_sources_ifdef(CONFIG_ZTEST_NEW_API src/ztest_rules.c)
zephyr_library_sources_ifdef(CONFIG_ZTEST_MOCKING src/ztest_mock.c)
zephyr_library_sources_ifdef(CONFIG_ZTRESS src/ztress.c)
if(CONFIG_ARCH_POSIX)
zephyr_library_sources_ifdef(CONFIG_ZTEST_NEW_API src/ztest_posix.c)
else()
zephyr_library_sources_ifdef(CONFIG_ZTEST_NEW_API src/ztest_defaults.c)
endif()