-
Notifications
You must be signed in to change notification settings - Fork 461
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
CMake configure preset installDir setting is evaluated relative to the binary directory instead of the source directory #3871
Comments
To reproduce the issue, remove the
Note the presence of |
Hi @Evelyn-001 & @Bekenn, this issue should now be fixed in the latest pre-release version of the CMake Tools extension. Let me know if it works for you, thanks! |
@snehara99, thanks for your reply. We verified this issue has been fixed on CMake Tools version: v1.19.22 (pre-release). Could you please verify it again? We are looking forward to hearing from you. Thanks. |
Thanks for the quick turnaround! I'll try to look at this tonight. |
I thought I'd responded to this, but apparently not; sorry! Yes, this works for me, as well. |
We are glad to be hearing your issue has been solved. Thanks for your support. |
Brief Issue Summary
From the CMake documentation for the
installDir
setting:The CMake Tools extension appears to evaluate this setting relative to the binary directory. If I supply a relative path and run the configure task using the CMake Tools extension, then the resulting cache variable for
CMAKE_INSTALL_PREFIX
begins with the binary directory. If I instead invoke CMake directly with the same preset, thenCMAKE_INSTALL_PREFIX
begins with the source directory.My best guess as to the cause is that the extension runs the configure step with the current working directory set to the binary directory. Passing a relative path with
-DCMAKE_INSTALL_PREFIX=
will cause CMake to form a path relative to the current working directory rather than the source directory. The CMake Tools extension should explicitly prepend the source directory in this case.CMake Tools Diagnostics
Debug Log
Additional Information
CMakeUserPresets.json
The text was updated successfully, but these errors were encountered: