File: CMakeLists.txt

package info (click to toggle)
libyang 5.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 11,212 kB
  • sloc: ansic: 131,170; xml: 671; sh: 448; tcl: 325; makefile: 19
file content (16 lines) | stat: -rw-r--r-- 739 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)
if(XXHASH_FOUND)
    target_link_libraries(cpp_compat ${XXHASH_LIBRARY})
endif()

target_compile_options(cpp_compat PUBLIC "-Werror=c++-compat")