[CMake] Changing the the current generator in CMake GUI
Bill Hoffman
bill.hoffman at kitware.com
Thu Jan 14 16:17:37 EST 2016
On 1/14/2016 3:02 PM, mozzis wrote:
> I was able to edit CMakeCache.txt and CPackConfig.cmake (with CMake GUI
> closed)
> I changed
> CMAKE_GENERATOR:INTERNAL=Visual Studio 10 2010 Win64
> to
> CMAKE_GENERATOR:INTERNAL=Visual Studio 10 2010
>
> and then in general looked for the string "64" and made appropriate changes.
> I then started CMake GUI, noted that the "Current Generator" was to my
> liking, and did Configure and Generate steps again.
You can not change the generator. It is better to remove the entire
build tree. Out of source builds are a best practice with CMake. Once
a build tree has been configured with one compiler, it must be
completely removed to change to a new compiler. You are changing from
32 bit to 64 bit, this means that all the try-compile stuff needs to be
re-run as the answers are likely to be different.
>
> All in all, doesn't seem that it would be too hard for CMake devs to
> implement a function to do this, but IMO Cmake is a mistake anyway, I only
> use it when forced (e.g., OpenCV.) CMake butchers MS Visual Studio project
> files, and makes it much harder to maintain projects that use it. Which I
> guess is kind of the opposite of the intended effect. More intelligent use
> of existing macros for both make and MSVS would go a long way to making it
> useful.
Thanks for the praise... :) CMake creates VS projects that should
work to build the project that is the goal. I don't understand about
make and MSVS, CMake can create makefiles or ninja files if that is what
you are talking about.
-Bill
More information about the CMake
mailing list