File tree Expand file tree Collapse file tree 3 files changed +13
-9
lines changed
Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ project(libyang C)
1515set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR} /CMakeModules/" )
1616
1717include (GNUInstallDirs)
18- include (CheckSymbolExists)
1918include (UseCompat)
2019include (ABICheck)
2120include (SourceFormat)
@@ -245,6 +244,7 @@ option(ENABLE_PERF_TESTS "Build performance tests" OFF)
245244option (ENABLE_COVERAGE "Build code coverage report from tests" OFF )
246245option (ENABLE_FUZZ_TARGETS "Build target programs suitable for fuzzing with AFL" OFF )
247246option (ENABLE_INTERNAL_DOCS "Generate doxygen documentation also from internal headers" OFF )
247+ option (ENABLE_YANGLINT_INTERACTIVE "Enable interactive CLI yanglint" ON )
248248option (BUILD_SHARED_LIBS "By default, shared libs are enabled. Turn off for a static build." ON )
249249set (YANG_MODULE_DIR "${CMAKE_INSTALL_PREFIX} /${CMAKE_INSTALL_DATADIR} /yang/modules/libyang" CACHE STRING "Directory where to copy the YANG modules to" )
250250
Original file line number Diff line number Diff line change 1+ include (CheckIncludeFile)
2+
13# config file for tools
24configure_file (${PROJECT_SOURCE_DIR} /tools/config.h.in ${PROJECT_BINARY_DIR} /tools/config.h @ONLY)
35
6+ # find ioctl
7+ check_include_file("sys/ioctl.h" HAVE_IOCTL)
8+ if (NOT HAVE_IOCTL)
9+ message (STATUS "Disabling interactive yanglint, sys/ioctl.h not found..." )
10+ set (ENABLE_YANGLINT_INTERACTIVE OFF )
11+ endif ()
12+
13+ # find getopt library on WIN32
414if (WIN32 )
515 find_library (GETOPT_LIBRARY NAMES getopt REQUIRED)
616 find_path (GETOPT_INCLUDE_DIR NAMES getopt.h REQUIRED)
Original file line number Diff line number Diff line change 11# yanglint
2-
3- if (WIN32 )
4- set (YANGLINT_INTERACTIVE OFF )
5- else ()
6- set (YANGLINT_INTERACTIVE ON )
7- endif ()
8-
92set (lintsrc
103 main_ni.c
114 cmd.c
@@ -25,7 +18,8 @@ set(lintsrc
2518 yl_schema_features.c
2619 common.c
2720)
28- if (YANGLINT_INTERACTIVE)
21+
22+ if (ENABLE_YANGLINT_INTERACTIVE)
2923 set (lintsrc ${lintsrc}
3024 main.c
3125 completion.c
You can’t perform that action at this time.
0 commit comments