Home > Software design >  How to disable Visual Studio CMake integration?
How to disable Visual Studio CMake integration?

Time:09-30

I have a repository that recently migrated from TFVC to TFS Git. Repo contains a bunch of C /C# projects and few solution files. Most of C projects get compiled on Linux as well -- build process copies required files to Linux VM, runs CMake, etc.

So, on Windows compilation is controlled by VS (via project files) and on Linux it is done via CMakeLists.txt -- these files are included into their respective projects (just for convenience, to edit them as required in VS before kicking off build).

After migration to Git VS started using these CMake files generating out directories all over the place every time I open any of the solution files. Needless to say it is very annoying and useless since these files weren't written with Windows build in mind.

Is there a way to ask Visual Studio to ignore CMakeLists.txt files? Modifying VS settings is not ideal -- this means fresh VS installation won't know about it.

Should I simply remove them from projects? Or set Exclude from build option?

CodePudding user response:

The only way to disable this (that I found) is to uninstall C CMake tools for Windows component in VS installer.

  • Related