Reputation: 7578
I have a Visual Studio 2017 Solution that has some header-only dependencies that are multiplatform and use CMake.
I do not need CMake at all, but I keep getting a lot of warnings and issues because Visual Studio 2017 insists on using CMake, exploring these projects, etc.
Is there a way to completely disable the CMake feature for this solution/project?
Update:
I load the project as a solution not as a CMake project.
It is a header-only library and it does not require CMake to work. It is just using it for testing and other purposes.
I keep the dependency as a git submodule so I don't want to make changes to it. It is correctly working by adding it to the main project as an include path, etc.
The only thing I want I want is to avoid is CMake autodiscovery in these directories because I have no use for it.
For instance:
Add Eigen to your project as a submodule in a directory called Eigen. (This is a header-only library)
Write some code in your solution and reference the header files (you need to add the correct include paths, etc.)
You will see that CMake will pick Eigen (when it is not actually necessary)
You will get warnings and Targets, etc.
Upvotes: 1
Views: 2366
Reputation: 3554
Don't open the CMakeLists.txt with File->Open->CMake
. Choose File->Open->File
. You can also try to uninstall the visual studio c++ tools for cmake
portion of Visual Studio 2017 via the installation tool.
Upvotes: 1
Reputation:
In Solution Explorer, locate CMakeLists.txt, right-click it. Select Custom Build Tool->General. Erase everything from there. Make sure you have a backup just in case ...
Upvotes: 1