MantisBT - CMake
View Issue Details
0013383CMakeCCMakepublic2012-07-07 04:092016-06-10 14:31
Ken Phillis 
Kitware Robot 
highmajoralways
closedmoved 
CMake 2.8.8 
 
0013383: CMAKE Autodetect defaults to "NMake Makefiles" when "MinGW Makefiles" should be used.
When i try to generate makefiles using the command line and gui program for cmake, the autodetection feature automatically forces the makefile generator to "NMake Makefiles". This behaviour is incorrect because I do not have visual studio installed at all, and it causes cmake to fail in a scenario where this should not happen.
1) Use a computer that has never had Visual Studio Installed.
2) Installing Visual studio runtimes is also ok.
3) Install Mingw GCC
4) Install gnu make
4) Install CMake ( i used the provided build of cmake-2.8.8-win32-x86.zip )
5) Select any random cmake project that can be built using cmake and mingw.
6) As long as visual studio itself is not installed, get the dependencies for said project.
7) build makefiles ( cmake . )
8) Compile project
For pkg-config, see: the "Glib and PKG-CONFIG" at this page of the vlc wiki:
http://wiki.videolan.org/Win32CompileMSYSNew [^]
The version of mingw gcc I used is tdm-gcc (mingw-w64 based). This is located at:
http://tdm-gcc.tdragon.net/ [^]
For gnu make, I used the latest build using mingw-w64 located at:
http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/make/ [^]


A temporary solution is to specify the mingw generator each time you run the cmake, however this is extremely cumbersome and most end developers will probably not want to mess with this in any fashion.

cmake . -G "MinGW Makefiles"


as for an more permanent solution, It's possible to fix this by improving the autodetection code ( lines 2181 to 22225 of Source/cmake.cxx ), or provide windows binaries that are made using mingw ( or mingw-w64) that have "CMAKE_BOOT_MINGW" defined.
No tags attached.
Issue History
2012-07-07 04:09Ken PhillisNew Issue
2012-12-14 20:50Ken PhillisNote Added: 0031901
2016-06-10 14:28Kitware RobotNote Added: 0042084
2016-06-10 14:28Kitware RobotStatusnew => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0031901)
Ken Phillis   
2012-12-14 20:50   
I looked at the latest sources, and there is no documented changes that suggest that this has been resolved.
(0042084)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.