From d33db659523bd6a8861546c8f5855df1f9d027a1 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 27 May 2021 18:37:10 -0400 Subject: [PATCH] Linux platform example app includes SHELL unconditionally. (#7205) * Linux platform example app includes SHELL unconditionally. Force defines and linkages as such, otherwise compilation with GN without 'use shell' does not work. TODO as followup: if shell is really optional, build it as such in linux as well. * remove the enable shell arg alltogether - it does not work because includes are already there * Revert "Fix relative path for the markdown link (#7202)" This reverts commit 7a172f3ee35cb396c5bad9491ec18c1e30a92322. Apparently link checker is not fully working and this broke doxygen. --- docs/README.md | 2 +- examples/platform/linux/AppMain.cpp | 4 ---- examples/platform/linux/BUILD.gn | 12 ++++-------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/docs/README.md b/docs/README.md index c7a9d2ab81433a..ef6e6223b99a30 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,7 +6,7 @@ [the build guide](./BUILDING.md) - Documentation about running [cirque](https://github.com/openweave/cirque) tests can be found in - [the cirque test guide](../src/test_driver/linux-cirque/README.md) + [the cirque test guide](src/test_driver/linux-cirque/README.md) - Documentation about standard build & development flows using [Visual Studio Code](https://code.visualstudio.com/) can be found in [the development guide](./VSCODE_DEVELOPMENT.md) diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index c5968cb66a81e1..59ab87db15c1cf 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -112,15 +112,11 @@ int ChipLinuxAppInit(int argc, char ** argv) void ChipLinuxAppMainLoop() { -#if CHIP_ENABLE_SHELL std::thread shellThread([]() { Engine::Root().RunMainLoop(); }); -#endif // Init ZCL Data Model and CHIP App Server InitServer(); chip::DeviceLayer::PlatformMgr().RunEventLoop(); -#if CHIP_ENABLE_SHELL shellThread.join(); -#endif } diff --git a/examples/platform/linux/BUILD.gn b/examples/platform/linux/BUILD.gn index 189bd1310c6ac2..89157f9f945ef6 100644 --- a/examples/platform/linux/BUILD.gn +++ b/examples/platform/linux/BUILD.gn @@ -19,10 +19,6 @@ config("app-main-config") { include_dirs = [ "." ] } -declare_args() { - chip_enable_shell = false -} - source_set("app-main") { sources = [ "AppMain.cpp", @@ -40,12 +36,12 @@ source_set("app-main") { public_deps = [ "${chip_root}/src/app/server", "${chip_root}/src/lib", + "${chip_root}/src/lib/shell", + "${chip_root}/src/lib/shell:shell_core", ] - if (chip_enable_shell) { - defines += [ "CHIP_ENABLE_SHELL" ] - public_deps += [ "${chip_root}/src/lib/shell" ] - } + public_deps += [ + ] public_configs = [ ":app-main-config" ] }