blob: e602f245914c06505c431e5e8b1ed9876b6167c4 [file] [log] [blame]
Radek Krejci92769a72020-11-19 20:57:32 +01001add_test(NAME headers
Michal Vasko938a3a52021-05-25 09:02:52 +02002 COMMAND ${CMAKE_SOURCE_DIR}/compat/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
Michal Vasko1b0b9a12021-05-06 08:38:34 +02009add_executable(cpp_compat cpp_compat.c $<TARGET_OBJECTS:yangobj>)
Michal Vasko45365802021-04-15 13:10:44 +020010target_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")