vscode-cmake-tools
vscode-cmake-tools copied to clipboard
Add files do not trigger re-configurate with glob & `CONFIGURE_DEPENDS` flag
Brief Issue Summary
Add files do not trigger re-configurate with glob & CONFIGURE_DEPENDS flag
For my buildscript:
file(GLOB_RECURSE CORE_SOURCES CONFIGURE_DEPENDS SOURCES "Core/*.*")
What I expected is to re-configurate automatically when I add some files under Core/ directory.
While cmake --build actually does the re-configuration, it still makes IntelliSense run into mistakes as it re-configurates too late.
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response
@ArcticLampyrid Thanks for the notification! This is an interesting case, that I don't believe we currently have a solution for. Therefore, I will mark this as an enhancement request.
I think that the possible solution for this would either be a user-configurable setting where you could tell us what source directories you care about, and we react to changes there. However, this is somewhat of a band-aid type fix. Additionally, if the FileAPI response contained information about something like this, then we could import it and use it for a feature like this.
Putting this on the backlog and we will continually monitor the upvotes and interest in this idea!
Track:
Additionally, if the FileAPI response contained information about something like this, then we could import it and use it for a feature like this.
CMake v3.30 is released with such API.
The cmake-file-api(7) "cmakeFiles" version 1 object's version field has been updated to 1.1. It gained a globsDependent field to report file(GLOB) calls using CONFIGURE_DEPENDS.
See also: https://cmake.org/cmake/help/v3.30/manual/cmake-file-api.7.html#cmakefiles-version-1
@ArcticLampyrid I've moved this item from our "Backlog" to "On Deck", thanks for pointing out that the FileAPI has been updated in CMake v3.30.