[Suggestion] Allow disable automatic CMake configure when saving CMakeLists.txt
See original GitHub issueThis pull request #1196 added new feature to automatic configure CMake when saving CMakeLists.txt
.
This is a great feature that integrates CMake projects with IntelliSense.
However, there were things I wanted to turn off this feature.
Specifically, when working on a project that has multiple CMakeLists.txt
, running CMake configure every time CMakeLists.txt
is saved will hinder my work.
Imagine a project with the following structure:
.
+-- include
| +-- CMakeLists.txt // Add `foo.hpp`, etc header files to project.
| +-- foo.hpp
+-- src
| +-- CMakeLists.txt // Add `cpp.hpp`, etc source files to project.
| +-- foo.cpp
+-- CMakeLists.txt // Calls `add_subdirectory(include)` and `add_subdirectory(src)` as aggregators.
My project has many source and header files, I have divided the project source file declarations in this way.
This project is using Qt. The problem is that Qt must perform the task of scanning the source files and generating additional source files (Qt MOC sources) every time CMake configure time.
I have to update the CMakeLists.txt
twice to add the header and source files.
CMake configure starts when the first CMakeLists.txt
is saved, and it also starts scanning the source.
I can’t work on it until I’ve finished scanning the source.
Could you add an option to turn off the this feature to get around the problem? I’m sure there are others besides me who would like to turn this feature off for projects that perform time-consuming tasks in the CMake configure step.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:27
- Comments:15 (5 by maintainers)
Top GitHub Comments
Yes we are going to fix this for the soon upcoming 1.4.1 update release.
This should be fixed in CMake Tools 1.4.1 which was published today. Let us know if you encounter any issues with this release.