Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does CMake specify "Platform Toolset" for a Visual Studio 2015 project?

Tags:

There is a VS2015 project which is generated by CMake and I want to change its "Platform Toolset".

"Platform Toolset" Location

I have tried these solutions but it doesn't work:

  1. set (CMAKE_VS_PLATFORM_TOOLSET "v120")

  2. cmake -T "v120"

Can anyone help? Thanks.

like image 777
P.X Avatar asked Feb 22 '16 08:02

P.X


People also ask

Does CMake work with Visual Studio 2019?

Visual Studio uses a CMake configuration file to drive CMake generation and build. CMakePresets. json is supported by Visual Studio 2019 version 16.10 or later and is the recommended CMake configuration file.

How do I open an existing CMake project in Visual Studio?

On the Visual Studio main menu, choose File > Open > CMake. Navigate to the CMakeLists. txt file in the root of the bullet3 repo you just downloaded. As soon as you open the folder, your folder structure becomes visible in the Solution Explorer.


1 Answers

First of all: remove the CMakeCache.txt if you have already generated your project. Next run cmake:

cmake -G "Visual Studio 14" -T v120 

Whenever you need to change your generator(and the toolset is a part of it) you should remove the CMakeCache.txt file.

like image 162
ixSci Avatar answered Oct 22 '22 05:10

ixSci