Skip to content

Commit

Permalink
Linux platform example app includes SHELL unconditionally. (project-c…
Browse files Browse the repository at this point in the history
…hip#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 (project-chip#7202)"

This reverts commit 7a172f3.
Apparently link checker is not fully working and this broke doxygen.
  • Loading branch information
andy31415 authored May 27, 2021
1 parent e9d0ac8 commit 09bfa9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions examples/platform/linux/AppMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
12 changes: 4 additions & 8 deletions examples/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ config("app-main-config") {
include_dirs = [ "." ]
}

declare_args() {
chip_enable_shell = false
}

source_set("app-main") {
sources = [
"AppMain.cpp",
Expand All @@ -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" ]
}

0 comments on commit 09bfa9d

Please sign in to comment.