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

fix: Only switch dir for building with preset #275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Osse
Copy link
Contributor

@Osse Osse commented Nov 22, 2024

config:build_directory_path() is relative to nvim's cwd, not the cwd as given in the config, so cmake --build will fail if config.cwd is a subdirectory of nvim's cwd. On the other hand, when using build presets CMake's cwd must be the directory where the preset files are. Fix this by only using config.cwd when building with presets.

@Osse Osse force-pushed the switch-dir-only-presets branch from 771897a to 85aace5 Compare November 22, 2024 08:00
@Civitasv
Copy link
Owner

Can you give a reproduce method?

@Osse
Copy link
Contributor Author

Osse commented Dec 22, 2024

Sure. Currently on holiday, but I'll be able to in a week or so.

@Civitasv
Copy link
Owner

Sure. Currently on holiday, but I'll be able to in a week or so.

Ok, enjoy your holiday 😄

@Osse Osse force-pushed the switch-dir-only-presets branch 3 times, most recently from 7a1a7e6 to 7334e9c Compare December 30, 2024 10:38
When using presets CMake's cwd *must* be the directory where the preset
files are. Fix this by only using config.cwd when building with presets.
@Osse Osse force-pushed the switch-dir-only-presets branch from 7334e9c to 34d28e1 Compare December 30, 2024 10:43
@Osse
Copy link
Contributor Author

Osse commented Dec 30, 2024

I have tested more, and I found that my change fixes something but I'm not quite sure what yet 😄 Will need to do some more testing. Please don't merge yet.

Also, formatting fails but the code that fails is not mine, so I'm not sure what you prefer I do about that.

@Civitasv
Copy link
Owner

Civitasv commented Jan 4, 2025

I have tested more, and I found that my change fixes something but I'm not quite sure what yet 😄 Will need to do some more testing. Please don't merge yet.

ok, I'll wait.

Also, formatting fails but the code that fails is not mine, so I'm not sure what you prefer I do about that.

You can also fix that if not too much. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants