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)
15
15
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR} /CMakeModules/" )
16
16
17
17
include (GNUInstallDirs )
18
- include (CheckSymbolExists )
19
18
include (UseCompat )
20
19
include (ABICheck )
21
20
include (SourceFormat )
@@ -245,6 +244,7 @@ option(ENABLE_PERF_TESTS "Build performance tests" OFF)
245
244
option (ENABLE_COVERAGE "Build code coverage report from tests" OFF )
246
245
option (ENABLE_FUZZ_TARGETS "Build target programs suitable for fuzzing with AFL" OFF )
247
246
option (ENABLE_INTERNAL_DOCS "Generate doxygen documentation also from internal headers" OFF )
247
+ option (ENABLE_YANGLINT_INTERACTIVE "Enable interactive CLI yanglint" ON )
248
248
option (BUILD_SHARED_LIBS "By default, shared libs are enabled. Turn off for a static build." ON )
249
249
set (YANG_MODULE_DIR "${CMAKE_INSTALL_PREFIX} /${CMAKE_INSTALL_DATADIR} /yang/modules/libyang" CACHE STRING "Directory where to copy the YANG modules to" )
250
250
Original file line number Diff line number Diff line change
1
+ include (CheckIncludeFile )
2
+
1
3
# config file for tools
2
4
configure_file (${PROJECT_SOURCE_DIR} /tools/config.h.in ${PROJECT_BINARY_DIR} /tools/config.h @ONLY )
3
5
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
4
14
if (WIN32 )
5
15
find_library (GETOPT_LIBRARY NAMES getopt REQUIRED )
6
16
find_path (GETOPT_INCLUDE_DIR NAMES getopt.h REQUIRED )
Original file line number Diff line number Diff line change 1
1
# yanglint
2
-
3
- if (WIN32 )
4
- set (YANGLINT_INTERACTIVE OFF )
5
- else ()
6
- set (YANGLINT_INTERACTIVE ON )
7
- endif ()
8
-
9
2
set (lintsrc
10
3
main_ni.c
11
4
cmd.c
@@ -25,7 +18,8 @@ set(lintsrc
25
18
yl_schema_features.c
26
19
common.c
27
20
)
28
- if (YANGLINT_INTERACTIVE )
21
+
22
+ if (ENABLE_YANGLINT_INTERACTIVE )
29
23
set (lintsrc ${lintsrc}
30
24
main.c
31
25
completion.c
You can’t perform that action at this time.
0 commit comments