t/cli: Fix build on Windows.

This commit is contained in:
Ryan Pavlik 2020-10-08 17:07:04 -05:00
parent 835beedcca
commit 9d8af39b4f
2 changed files with 11 additions and 1 deletions

View file

@ -6,7 +6,6 @@
set(SOURCE_FILES
cli_cmd_calibrate.c
cli_cmd_lighthouse.c
cli_cmd_probe.c
cli_cmd_test.c
@ -14,6 +13,13 @@ set(SOURCE_FILES
cli_main.c
)
if(NOT WIN32)
# No getline on Windows, so until we have a portable impl
list(APPEND SOURCE_FILES
cli_cmd_calibrate.c
)
endif()
add_executable(cli
${SOURCE_FILES}
)

View file

@ -8,6 +8,8 @@
#include "cli_common.h"
#include "xrt/xrt_config_os.h"
#include <string.h>
#include <stdio.h>
@ -47,9 +49,11 @@ main(int argc, const char **argv)
if (strcmp(argv[1], "probe") == 0) {
return cli_cmd_probe(argc, argv);
}
#ifndef XRT_OS_WINDOWS
if (strcmp(argv[1], "calibrate") == 0) {
return cli_cmd_calibrate(argc, argv);
}
#endif // !XRT_OS_WINDOWS
if (strcmp(argv[1], "lighthouse") == 0) {
return cli_cmd_lighthouse(argc, argv);
}