Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] cmake-based build should not modify CMAKE_CURRENT_SOURCE_DIR #14952

Open
1 task done
yamt opened this issue Nov 26, 2024 · 3 comments
Open
1 task done

[BUG] cmake-based build should not modify CMAKE_CURRENT_SOURCE_DIR #14952

yamt opened this issue Nov 26, 2024 · 3 comments
Labels
Arch: all Issues that apply to all architectures Area: Build system OS: Mac Issues related to MacOS (building system, etc) Type: Bug Something isn't working

Comments

@yamt
Copy link
Contributor

yamt commented Nov 26, 2024

Description / Steps to reproduce the issue

it seems that cmake-based build sometimes modifies files under CMAKE_CURRENT_SOURCE_DIR.
eg. it expands littlefs source tree to fs/littlefs/littlefs.
it should be done under CMAKE_BINARY_DIR instead.
we should treat CMAKE_CURRENT_SOURCE_DIR read-only.

On which OS does this issue occur?

[OS: Mac]

What is the version of your OS?

macOS 14.7

NuttX Version

master

Issue Architecture

[Arch: all]

Issue Area

[Area: Build System]

Verification

  • I have verified before submitting the report.
@yamt yamt added the Type: Bug Something isn't working label Nov 26, 2024
@github-actions github-actions bot added Arch: all Issues that apply to all architectures Area: Build system OS: Mac Issues related to MacOS (building system, etc) labels Nov 26, 2024
@xiaoxiang781216
Copy link
Contributor

@xuxin930 please look at this problem.

@xuxin930
Copy link
Contributor

xuxin930 commented Dec 5, 2024

Yes @yamt very nice advice.

most of the modifications to the source tree now is
fetching data from external repositories.

considering the possibility of reusing these external repos.
Is it acceptable to keep them?

@yamt
Copy link
Contributor Author

yamt commented Dec 6, 2024

a problem is that sometimes it prevents users from using multiple build dirs with a single source tree.
eg. when fetched data is configuration-dependent. (different versions, different local patches, etc)

IMO, it's simpler to put downloaded files under the build dir.

if we want to to have a shared cache of downloaded files, maybe it's cleaner to use a dedicated dir, instead of the source dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: all Issues that apply to all architectures Area: Build system OS: Mac Issues related to MacOS (building system, etc) Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants