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

CMake-Tools does not reconfigure after change of CMakeLists.txt in subdirectory of root #1911

Closed
diggidende opened this issue Jun 2, 2021 · 2 comments
Labels
bug a bug in the product Feature: configure fixed (release pending) fixed in pre-release and is pending official release
Milestone

Comments

@diggidende
Copy link

diggidende commented Jun 2, 2021

Brief Issue Summary

I have a project with a CMakeLists.txt in the root directory and another CMakeLists.txt in subdirectory 'src'. CMakeLists.txt in the root directory contains the command 'add_subdirectory(src)'. Whenever I make a change to src/CMakeLists.txt (i.e. in the subdirectory), CMake does not reconfigure the project automatically. When I make a change to CMakeLists.txt in the root directory, CMake does reconfigure the project automatically, as expected.

Expected:

CMake-Tools should automatically trigger a CMake reconfiguration of the project whenever any of the CMakeLists.txt files in subdirectories of the root directory are modified and saved.

  1. Modify and save subdirectory/CMakeLists.txt
  2. CMake-Tools triggers reconfiguration of project.

Apparent Behavior:

  1. Modify and save subdirectory/CMakeLists.txt
  2. Nothing happens

Platform and Versions

  • Operating System: Windows 10
  • CMake Version: 3.20.21032501-MSVC_2
  • VSCode Version: 1.56.2
  • CMake Tools Extension Version: 1.7.3
  • Compiler/Toolchain: Visual C++ 2019

Other Notes/Information

One annoying consequence of the issue: whenever I add a new file (.cpp / .h) to the project, IntelliSense keeps reporting errors (e.g. for #include statements) until I manually trigger a reconfiguration of the project, even though I explicitly add those files to the source list of a target in src/CMakeLists.txt. (see the IntelliSense issue described under https://vector-of-bool.github.io/docs/vscode-cmake-tools/common_issues.html)

@bobbrow
Copy link
Member

bobbrow commented Jun 4, 2021

Thanks for letting us know. We'll take a look.

@bobbrow
Copy link
Member

bobbrow commented Oct 19, 2021

This was fixed in 1.9.0

@bobbrow bobbrow closed this as completed Oct 19, 2021
@bobbrow bobbrow added the fixed (release pending) fixed in pre-release and is pending official release label Oct 19, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: configure fixed (release pending) fixed in pre-release and is pending official release
Projects
None yet
Development

No branches or pull requests

3 participants