acassis opened a new pull request, #19755:
URL: https://github.com/apache/nuttx/pull/19755

   ## Summary
   
   This change fixes NuttX’s CMake support when NuttX is embedded in another 
project via add_subdirectory(). CMake’s CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR 
refer to the outermost project, causing NuttX to access its .config, generated 
files, host tools, and build artifacts in the parent project’s directories. The 
fix introduces NUTTX_DIR and NUTTX_BINARY_DIR, based on 
CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR, and consistently uses 
them for NuttX self-references while preserving existing standalone builds. It 
fixes the Kconfig initialization failure reported in #19697 and allows an 
embedded sim:nsh build to configure, build, and boot successfully. The change 
affects only the CMake build system (not Make or Kconfig defaults), requires 
the corresponding nuttx-apps change, and does not extend add_subdirectory() 
support to cross-compiled non-sim boards due to CMake’s toolchain-file 
limitation.
   
   ## Impact
   
   Fixes https://github.com/apache/nuttx/issues/19697
   
   ## Testing
   
   Tested as #19697 and compiled correctly


-- 
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]

Reply via email to