Radek Krejci | 92769a7 | 2020-11-19 20:57:32 +0100 | [diff] [blame] | 1 | add_test(NAME headers |
Michal Vasko | 4536580 | 2021-04-15 13:10:44 +0200 | [diff] [blame] | 2 | COMMAND ${CMAKE_SOURCE_DIR}/tests/style/check_includes.sh ${CMAKE_SOURCE_DIR}/src/ ${CMAKE_SOURCE_DIR}/tools/lint/ ${CMAKE_SOURCE_DIR}/tools/re/) |
Radek Krejci | 5348e6c | 2021-04-13 21:18:51 +0200 | [diff] [blame] | 3 | |
| 4 | if (${SOURCE_FORMAT_ENABLED}) |
Michal Vasko | 4536580 | 2021-04-15 13:10:44 +0200 | [diff] [blame] | 5 | add_test(NAME format WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND make format-check) |
Radek Krejci | 5348e6c | 2021-04-13 21:18:51 +0200 | [diff] [blame] | 6 | endif() |
Michal Vasko | 4536580 | 2021-04-15 13:10:44 +0200 | [diff] [blame] | 7 | |
| 8 | # just compile |
| 9 | add_executable(cpp_compat cpp_compat.c $<TARGET_OBJECTS:yangobj> $<TARGET_OBJECTS:compat>) |
| 10 | target_include_directories(cpp_compat BEFORE PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
| 11 | target_link_libraries(cpp_compat ${CMAKE_THREAD_LIBS_INIT} ${PCRE2_LIBRARIES} ${CMAKE_DL_LIBS} m) |
| 12 | target_compile_options(cpp_compat PUBLIC "-Werror=c++-compat") |