[CMake] Generator Toolset fails

Brad King brad.king at kitware.com
Thu Jun 13 17:00:48 EDT 2013


On 6/13/2013 4:36 PM, Malfettone, Kris wrote:
> Just wanted to add some extra information.  I found a way to work around
> the problem by first generating with:
> cmake –G "Visual Studio 11" <path_to_src>
> 
> Then reconfiguring directly after with:
> cmake –G "Visual Studio 11" -DCMAKE_GENERATOR_TOOLSET=v100 <path_to_src>
> 
> I think the key to the workaround working is that while the –T command
> line argument checks for changes in CMAKE_GENERATOR_TOOLSET between
> configuring, using the cache variable does not.  This also means the it
> doesn’t execute the try compile step again in the second configure step
> since it doesn’t think it needs to.

Behavior for changing the toolset in an existing tree is not
well-defined so this may not produce a fully consistent build.

>   Run Build Command:C:\PROGRA~2\MICROS~3.0\Common7\IDE\devenv.com

Try setting CMAKE_MAKE_PROGRAM to the path to msbuild instead
of devenv, in a new run on a fresh build tree, along with the
desired toolset.

-Brad


More information about the CMake mailing list