Commit 7eabab2f authored by Reto Schneider's avatar Reto Schneider Committed by Anas Nashif
Browse files

samples, tests: Use semi-accurate project names



When using an IDE (e.g. Eclipse, Qt Creator), the project name gets
displayed. This greatly simplifies the navigation between projects when
having many of them open at the same time. Naming every project "NONE"
defeats this functionality.

This patch tries to use sensible project names while not duplicating
too much of what is already represented in the path. This is done by
using the name of the directory the relevant CMakeLists.txt file is
stored in. To ensure unique project names in the samples (and again, in
the tests folder) folder, small manual adjustments have been done.

Signed-off-by: default avatarReto Schneider <code@reto-schneider.ch>
parent d3528cf0
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ Follow these steps to create a new application directory. (Refer to
      # Boilerplate code, which pulls in the Zephyr build system.
      cmake_minimum_required(VERSION 3.8.2)
      include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
      project(NONE)
      project(my_zephyr_app)

      # Add your source file to the "app" target. This must come after
      # the boilerplate code, which defines the target.
@@ -733,7 +733,7 @@ Create a Debugger Configuration

   - In the Main tab:

     - Project: NONE@build
     - Project: my_zephyr_app@build
     - C/C++ Application: :file:`zephyr/zephyr.elf`

   - In the Debugger tab:
@@ -910,7 +910,7 @@ Make sure to follow these steps in order.
   .. code-block:: cmake

      include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
      project(NONE)
      project(my_zephyr_app)

#. Now add any application source files to the 'app' target
   library, each on their own line, like so:
@@ -926,7 +926,7 @@ Below is a simple example :file:`CMakeList.txt`:
   set(BOARD qemu_x86)

   include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
   project(NONE)
   project(my_zephyr_app)

   target_sources(app PRIVATE src/main.c)

+1 −1
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.8.2)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(NONE)
project(external_lib)

target_sources(app PRIVATE src/main.c)

+1 −1
Original line number Diff line number Diff line
@@ -9,6 +9,6 @@ set(BOARD_ROOT ${CMAKE_CURRENT_LIST_DIR})
set(BOARD nrf52840_pca10056)

include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(NONE)
project(out_of_tree_board)

target_sources(app PRIVATE src/main.c)
+1 −1
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.8.2)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(NONE)
project(blink_led)

target_sources(app PRIVATE src/main.c)
+1 −1
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.8.2)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(NONE)
project(blinky)

target_sources(app PRIVATE src/main.c)
Loading