cmake: Use NUTTX(_DIR/_BIN_DIR) instead of CMAKE(_SOURCE_DIR/BIN_DIR) - #3711
Conversation
|
Ignore Check issue: /home/runner/work/nuttx-apps/nuttx-apps/apps/crypto/controlse/CMakeLists.txt:39: ccertificate ==> certificate ccertificate.cxx is the file name |
|
Thank you @acassis :-) git subject too long and no test logs here nor in referenced apache/nuttx#19697.. we should keep thing clean and let the ci pass :-P |
Tomek, come on :-) , I asked another AI to simplify it, do you want the original: |
…Y_DIR) This companion change updates the nuttx-apps CMake build to use NuttX’s NUTTX_DIR and NUTTX_BINARY_DIR instead of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR, which incorrectly refer to the outermost project when NuttX is embedded via add_subdirectory(). Since apps/ is itself included from NuttX’s top-level CMakeLists.txt, these variables were effectively being used as references to NuttX’s root and inherited the same bug fixed in the matching NuttX change for #19697. All self-referencing uses are replaced while intentionally preserving standalone projects and unrelated custom variables or hardcoded paths. The change affects only the CMake build system, preserves normal standalone behavior, and was tested with sim:nsh both standalone and embedded, with apps such as hello and ostest successfully built and available in NSH. Fixes #19697. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Alan Carvalho de Assis <[email protected]>
|
Please at least attach local build logs in Testing section, not some ai blah blah :-) Each PR / git commit changes something, during review we need to know what changed and why (we have this part) then test logs from before and after change to show fix works (this part is missing). We can merge something against ci testing but we need to at least provide local test logs pretty please :-) :-) |
|
Btw it would be nice to tell ci we want other tests even if "check" part fails :-) |
It was the steps created by AI and the output from console. You can reproduce it just creating that same CMakefile.txt
Ok, now you have the complete log there!
Right! |
Summary
This companion change updates the nuttx-apps CMake build to use NuttX’s NUTTX_DIR and NUTTX_BINARY_DIR instead of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR, which incorrectly refer to the outermost project when NuttX is embedded via add_subdirectory(). Since apps/ is itself included from NuttX’s top-level CMakeLists.txt, these variables were effectively being used as references to NuttX’s root and inherited the same bug fixed in the matching NuttX change for #19697. All self-referencing uses are replaced while intentionally preserving standalone projects and unrelated custom variables or hardcoded paths. The change affects only the CMake build system, preserves normal standalone behavior, and was tested with sim:nsh both standalone and embedded, with apps such as hello and ostest successfully built and available in NSH.
Impact
Fixes apache/nuttx#19697
Testing