diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:55:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:55:11 +0000 |
commit | cd07912073c951b4bbb871ed2653af1be2cfc714 (patch) | |
tree | 1073c2308492e6aea4c66cb7436ee92db2abfd42 /tests/style/CMakeLists.txt | |
parent | Initial commit. (diff) | |
download | libyang2-upstream.tar.xz libyang2-upstream.zip |
Adding upstream version 2.1.30.upstream/2.1.30upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/style/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/style/CMakeLists.txt b/tests/style/CMakeLists.txt new file mode 100644 index 0000000..93d6049 --- /dev/null +++ b/tests/style/CMakeLists.txt @@ -0,0 +1,12 @@ +add_test(NAME headers + COMMAND ${CMAKE_SOURCE_DIR}/compat/check_includes.sh ${CMAKE_SOURCE_DIR}/src/ ${CMAKE_SOURCE_DIR}/tools/lint/ ${CMAKE_SOURCE_DIR}/tools/re/) + +if (${SOURCE_FORMAT_ENABLED}) + add_test(NAME format WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND cmake --build ${CMAKE_BINARY_DIR} --target format-check) +endif() + +# just compile +add_executable(cpp_compat cpp_compat.c $<TARGET_OBJECTS:yangobj>) +target_include_directories(cpp_compat BEFORE PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(cpp_compat ${CMAKE_THREAD_LIBS_INIT} ${PCRE2_LIBRARIES} ${CMAKE_DL_LIBS} m) +target_compile_options(cpp_compat PUBLIC "-Werror=c++-compat") |