simbit18 commented on code in PR #3526:
URL: https://github.com/apache/nuttx-apps/pull/3526#discussion_r3462582310
##########
examples/sotest/main/CMakeLists.txt:
##########
@@ -21,27 +21,70 @@
#
##############################################################################
if(CONFIG_EXAMPLES_SOTEST)
+ set(SOTEST_SYMTAB ${CMAKE_CURRENT_BINARY_DIR}/sotest_symtab.c)
+ set(SOTEST_ROMFS_IMG ${CMAKE_CURRENT_BINARY_DIR}/sotest_romfs.img)
+ set(SOTEST_ROMFS_SRC ${CMAKE_CURRENT_BINARY_DIR}/sotest_romfs.c)
+ set(SOTEST_MODPRINT_ELF ${CMAKE_BINARY_DIR}/bin/modprint)
+ set(SOTEST_SHARED_ELF ${CMAKE_BINARY_DIR}/bin/sotest)
+
+ # Dynamic applications are wrapped in ELF_* helper targets when the build
uses
+ # the non-ELF-capable compiler path.
+ if(CMAKE_C_ELF_COMPILER)
+ set(SOTEST_MODPRINT_TARGET modprint)
+ set(SOTEST_SHARED_TARGET sotest)
+ else()
+ set(SOTEST_MODPRINT_TARGET ELF_modprint)
+ set(SOTEST_SHARED_TARGET ELF_sotest)
+ endif()
- # FIXME: fix all empty a after the kernel build is implemented
add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sotest_symtab.c
+ OUTPUT ${SOTEST_SYMTAB}
COMMAND
- ${NUTTX_APPS_DIR}/tools/mksymtab.sh ${CMAKE_CURRENT_BINARY_DIR}/empty
- g_sot > ${CMAKE_CURRENT_BINARY_DIR}/sotest_symtab.c)
+ sh -c
Review Comment:
@acassis We've already talked about this here
https://github.com/apache/nuttx/pull/18661#discussion_r3022444810
CMake already requires Python
```
find_program(KCONFIGLIB olddefconfig)
if(NOT KCONFIGLIB)
# cmake-format: off
message(
FATAL_ERROR "Kconfig environment depends on kconfiglib, Please install:
(APT source)
$ sudo apt install python3-kconfiglib
or (pip source)
$ pip install kconfiglib
or (After Ubuntu 24.04)
$ pip install kconfiglib --break-system-packages")
# cmake-format: on
endif()
```
https://github.com/apache/nuttx/blob/master/CMakeLists.txt#L95-L107
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]