Skip to content

Conversation

trns1997
Copy link
Contributor

@trns1997 trns1997 commented Sep 28, 2025

Note: Please adhere to Contributing Guidelines.

Summary

This PR updates the NuttX apps CMake configuration to exclude the cxx-oot-build directory from the build process.

Previously, cxx-oot-build was guarded manually to avoid being included during builds. With the new EXCLUDE support added to nuttx_add_subdirectory() (see apache/nuttx#17105) this PR replaces that guard logic with the cleaner exclusion rule.

This ensures that cxx-oot-build is consistently ignored during app builds, while simplifying the CMake configuration.

Impact

  • Build system: cxx-oot-build is now excluded using the standardized EXCLUDE mechanism. Removes custom guard logic, reducing complexity.

  • Compatibility: No impact on users who do not use out-of-tree builds. Transparent to standard builds.

Testing

  1. Built apps with cxx-oot-build present.
  2. Confirmed that the directory was excluded via the EXCLUDE mechanism.
  3. Verified normal build behavior when no out-of-tree build folder is present.

@trns1997
Copy link
Contributor Author

ping @raiden00pl

Copy link
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build errors needs fix :-(

CMake Error at /github/workspace/sources/apps/testing/cxx-oot-build/CMakeLists.txt:40 (add_executable):
  Cannot find source file:

    /github/workspace/sources/nuttx/src/HelloWorld.cpp


CMake Error at /github/workspace/sources/apps/testing/cxx-oot-build/CMakeLists.txt:40 (add_executable):
  No SOURCES given to target: oot


CMake Generate step failed.  Build files cannot be regenerated correctly.
  Building NuttX...
ninja: error: loading 'build.ninja': No such file or directory
ninja: error: loading 'build.ninja': No such file or directory
cp: cannot stat 'nuttx': No such file or directory
cp: cannot stat 'nuttx': No such file or directory
ninja: error: loading 'build.ninja': No such file or directory
ninja: error: loading 'build.ninja': No such file or directory

@trns1997
Copy link
Contributor Author

build errors needs fix :-(

CMake Error at /github/workspace/sources/apps/testing/cxx-oot-build/CMakeLists.txt:40 (add_executable):
  Cannot find source file:

    /github/workspace/sources/nuttx/src/HelloWorld.cpp


CMake Error at /github/workspace/sources/apps/testing/cxx-oot-build/CMakeLists.txt:40 (add_executable):
  No SOURCES given to target: oot


CMake Generate step failed.  Build files cannot be regenerated correctly.
  Building NuttX...
ninja: error: loading 'build.ninja': No such file or directory
ninja: error: loading 'build.ninja': No such file or directory
cp: cannot stat 'nuttx': No such file or directory
cp: cannot stat 'nuttx': No such file or directory
ninja: error: loading 'build.ninja': No such file or directory
ninja: error: loading 'build.ninja': No such file or directory

apache/nuttx#17105 Need this to be merged for this to work. Sorry i created the PR a bit too quickly :\

Remove the previous guard logic and use a proper CMake
`exclude` rule to prevent `cxx-oot-build` from being
included when building projects with CMake.

* Ensures OOT test project is not pulled into normal apps.
* Keeps CI and export tests isolated from regular builds.

Signed-off-by: trns1997 <[email protected]>
@trns1997 trns1997 force-pushed the use-updated-nuttx-add-subdir branch from 7424426 to df9748c Compare October 3, 2025 07:59
@trns1997
Copy link
Contributor Author

trns1997 commented Oct 8, 2025

ping @cederom @xiaoxiang781216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants