[cmake-developers] [CMake 0015698]: default generator does not match compiler or native bit length
Mantis Bug Tracker
mantis at public.kitware.com
Sun Aug 16 03:12:04 EDT 2015
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15698
======================================================================
Reported By: Brandon Van Every
Assigned To:
======================================================================
Project: CMake
Issue ID: 15698
Category: (No Category)
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-08-16 03:12 EDT
Last Modified: 2015-08-16 03:12 EDT
======================================================================
Summary: default generator does not match compiler or native
bit length
Description:
I recently installed a totally clean Windows 10 Pro 64-bit system on one of my
laptops. I added Visual Studio 2015 Community Edition and then CMake 3.3.1. I
went to build Urho3D. I clicked on the default generator "Visual Studio 14
2015" because it seemed correct. I wasn't in the habit of ever needing to
select anything from the submenu, as if I ever selected anything, it was done
long ago and stored in the CMake registry entries.
I got a 32-bit build on a 64-bit machine. I proceeded to tear my hair out for 2
hours as to why this was so. It was true of every CMake-based project I tried,
not just Urho3D. By looking at other machines I eventually figured out that the
CMake version was different, and that the correct, non-default generator is
"Visual Studio 14 2015 Win64".
I think it should have given me, by default, the only compiler that was actually
installed on my system. It also shouldn't have offered a 32-bit default
generator on a 64-bit system, even if it couldn't know what compiler I wanted
for some reason.
I hadn't had this problem on my Windows 7 "primary development" machine, which
has Visual Studio 2013 Community Edition. It always gave me the correct 64-bit
generator. However CMake was remembering a choice of mine from long ago, that I
had long since forgotten I had made. To prove this, I uninstalled CMake 3.3.1.
I opened regedit and deleted everything under HKEY_CURRENT_USER/Software/Kitware
so that no trace of my previous actions would remain. Then I reinstalled and
configured Urho3D using cmake-gui. I was quite surprised to be offered "Visual
Studio 14 2015" as the default. Visual Studio 2015 is not installed on the
system, only 2013. It's a 64-bit system, not 32-bit. The default is not
appropriate.
I think offering appropriate defaults is less likely to frustrate (1) new CMake
users, (2) experienced CMake users who have forgotten that values are lurking in
the registry. Particularly because the generators have very similar sounding
names.
If multiple compilers are installed on the system, it would be appropriate to
guess the most likely one first. i.e. most recent version of VS, if more than 1
is installed. VS before MinGW-64. MinGW-64 before MinGW32. MinGW before
Cygwin. Cygwin before anything truly obscure or weird.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-08-16 03:12 Brandon Van EveryNew Issue
======================================================================
More information about the cmake-developers
mailing list