diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/board_test/CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/device/board_test/CMakeLists.txt b/examples/device/board_test/CMakeLists.txt index 5bb8cb700..8cd5b9ea4 100644 --- a/examples/device/board_test/CMakeLists.txt +++ b/examples/device/board_test/CMakeLists.txt @@ -17,12 +17,14 @@ if(FAMILY MATCHES "^esp32s[2-3]") else() - # Family chooses name based on passed name and vars (e.g. <BOARD>-<DIR_NAME>) - get_filename_component(DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) - family_get_project_name(PROJECT "${DIR_NAME}") + # gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>) + family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR}) project(${PROJECT}) + # Checks this example is valid for the family and initializes the project + family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}) + add_executable(${PROJECT}) # Example source |
