MantisBT - CMake
View Issue Details
0013179CMakeCMakepublic2012-05-01 07:592013-01-09 14:05
Gerhard Aichinger 
Peter Kuemmel 
normalminoralways
closedfixed 
PCWindowsXP SP3
CMake 2.8.8 
CMake 2.8.10CMake 2.8.10 
0013179: Unix Makefiles generator fails with MinGW tools with CMAKE_RC_COMPILER-NOTFOUND
With CMake 2.8.8 each configure without setting parameter -DCMAKE_RC_COMPILER fails.
See attached file cmake_failure.log
CMake 2.6.4 configuring the same project works well without setting
CMAKE_RC_COMPILER.
CMakeLists.txt:
--------------------------
project(Test)
cmake_minimum_required(VERSION 2.8)
set(SRC main.cpp)
add_executable(Test ${SRC})

main.cpp:
--------------------------
int main() {
  return 0;
}

DOS console:

cmake -G "Unix Makefiles"
==> build failed

cmake -G "Unix Makefiles" -DCMAKE_RC_COMPILER=C:/MinGW/bin/windres.exe
==> build ok
From my point of view C:\Programme\CMake
2.8\share\cmake-2.8\Modules\Platform\Windows-GNU.cmake file should be modified
(see C:\Programme\CMake2.8\share\cmake-2.8\Modules\Platform\CYGWIN-GNU.cmake file)
If I added "set(CMAKE_GENERATOR_RC windres)" before "enable_language(RC)",
then build works correct.
No tags attached.
log cmake_failure.log (1,426) 2012-05-01 07:59
https://public.kitware.com/Bug/file/4317/cmake_failure.log
Issue History
2012-05-01 07:59Gerhard AichingerNew Issue
2012-05-01 07:59Gerhard AichingerFile Added: cmake_failure.log
2012-05-01 08:24Brad KingNote Added: 0029380
2012-05-01 08:24Brad KingAssigned To => Bill Hoffman
2012-05-01 08:24Brad KingStatusnew => backlog
2012-05-01 08:24Brad KingTarget Version => CMake 2.8.9
2012-05-01 08:24Brad KingSummaryConfigure fails with CMAKE_RC_COMPILER-NOTFOUND => Unix Makefiles generator fails with MinGW tools with CMAKE_RC_COMPILER-NOTFOUND
2012-05-01 08:28Amine KhaldiNote Added: 0029381
2012-06-19 16:14Peter KuemmelNote Added: 0029748
2012-06-19 16:31Peter KuemmelNote Edited: 0029748bug_revision_view_page.php?bugnote_id=29748#r692
2012-07-09 07:13David ColeNote Added: 0029987
2012-07-09 07:18David ColeTarget VersionCMake 2.8.9 =>
2012-08-20 11:53David ColeAssigned ToBill Hoffman =>
2012-08-20 11:53David ColeStatusbacklog => new
2012-08-20 11:53David ColeTarget Version => CMake 2.8.10
2012-08-27 11:00Peter KuemmelAssigned To => Peter Kuemmel
2012-08-27 11:00Peter KuemmelStatusnew => assigned
2012-08-27 11:01Peter KuemmelNote Added: 0030775
2012-08-27 11:01Peter KuemmelStatusassigned => resolved
2012-08-27 11:01Peter KuemmelFixed in Version => CMake 2.8.10
2012-08-27 11:01Peter KuemmelResolutionopen => fixed
2013-01-09 14:05Robert MaynardNote Added: 0032082
2013-01-09 14:05Robert MaynardStatusresolved => closed

Notes
(0029380)
Brad King   
2012-05-01 08:24   
Usually with MinGW tools we use the "MinGW Makefiles" or "MSYS Makefiles" generator. They already set CMAKE_GENERATOR_RC to windres. Perhaps Windows-GNU.cmake could contain

 if(NOT CMAKE_GENERATOR_RC)
   set(CMAKE_GENERATOR_RC windres)
 endif()

to work with "Unix Makefiles".
(0029381)
Amine Khaldi   
2012-05-01 08:28   
We (ReactOS) get something like this when we try to compile our host tools with the ninja generator.
(0029748)
Peter Kuemmel   
2012-06-19 16:14   
(edited on: 2012-06-19 16:31)
Is fixed for ninja with the merge of 'ninja-cldeps'.

(0029987)
David Cole   
2012-07-09 07:13   
Unset target version field; too late for a fix to go into 2.8.9; deferred until a future version.
(0030775)
Peter Kuemmel   
2012-08-27 11:01   
http://public.kitware.com/pipermail/cmake-commits/2012-August/013306.html [^]
(0032082)
Robert Maynard   
2013-01-09 14:05   
Closing resolved issues that have not been updated in more than 4 months.