blob: 05c09ce6ee3035ad9674aaa412c55bbb44741da1 [file] [log] [blame]
Radek Krejci92769a72020-11-19 20:57:32 +01001add_test(NAME headers
Michal Vasko45365802021-04-15 13:10:44 +02002 COMMAND ${CMAKE_SOURCE_DIR}/tests/style/check_includes.sh ${CMAKE_SOURCE_DIR}/src/ ${CMAKE_SOURCE_DIR}/tools/lint/ ${CMAKE_SOURCE_DIR}/tools/re/)
Radek Krejci5348e6c2021-04-13 21:18:51 +02003
4if (${SOURCE_FORMAT_ENABLED})
Michal Vasko45365802021-04-15 13:10:44 +02005 add_test(NAME format WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND make format-check)
Radek Krejci5348e6c2021-04-13 21:18:51 +02006endif()
Michal Vasko45365802021-04-15 13:10:44 +02007
8# just compile
9add_executable(cpp_compat cpp_compat.c $<TARGET_OBJECTS:yangobj> $<TARGET_OBJECTS:compat>)
10target_include_directories(cpp_compat BEFORE PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
11target_link_libraries(cpp_compat ${CMAKE_THREAD_LIBS_INIT} ${PCRE2_LIBRARIES} ${CMAKE_DL_LIBS} m)
12target_compile_options(cpp_compat PUBLIC "-Werror=c++-compat")