View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015711CMakeCMakepublic2015-08-26 07:012016-01-04 11:52
ReporterA. Klitzing 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformMSVC 2015 / Ninja 1.6.0OSWindowsOS Version10.4.10
Product VersionCMake 3.3.1 
Target VersionFixed in Version 
Summary0015711: Ninja cannot build resource file
DescriptionIf we use Ninja generator to build our application it will fail to compile our .rc file.

If we use the NMake Makefile it builds without any problems.
Additional InformationHere is the output of "ninja -v":

[...]
[14/16] C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe /nologo /TP /DWIN32 /D_WINDOWS /W3 /GR /EHsc /W3 /MD /O2 /Ob2 /D NDEBUG -Isrc -IC:\ninja\source\src -IC:\ninja\source\src\global -IC:\ninja\source\src\core -IC:\ninja\libs\build\dist\include -IC:\ninja\libs\build\dist\include\QtCore -IC:\ninja\libs\build\dist\mkspecs\win32-msvc2015 -IC:\ninja\source\src\external -IC:\ninja\source\src\card\base -IC:\ninja\source\src\activation -IC:\ninja\source\src\settings -IC:\ninja\source\src\network -IC:\ninja\libs\build\dist\include\QtNetwork -IC:\ninja\libs\build\dist\include\QtXml -IC:\ninja\libs\build\dist\include\QtGui -IC:\ninja\libs\build\dist\include\QtWidgets -IC:\ninja\libs\build\dist\include\QtQml -IC:\ninja\libs\build\dist\include\QtQuick -DAPPCAST_URL=\"https://XYZ\" [^] -DVERSION=\"1.0.0+67-stable\" /showIncludes -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MESSAGELOGCONTEXT -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_QML_LIB -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DUNICODE -DUSE_DESKTOP_WIDGETS -DUSE_WINDOWS_WIDGETS /Fosrc\CMakeFiles\Application.dir\main.cpp.obj /Fdsrc\CMakeFiles\Application.dir\ /FS -c C:\ninja\source\src\main.cpp
[15/16] "" RC C:\ninja\source\resources\windows.rc "src/CMakeFiles/Application.dir/__/resources/windows.rc.res.d" src\CMakeFiles\Application.dir\__\resources\windows.rc.res "" "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe" C:\PROGRA~2\WI3CF2~1\8.1\bin\x86\rc.exe /DWIN32 -IC:\ninja\build\src -IC:\ninja\source\src -IC:\ninja\source\src\global -IC:\ninja\source\src\core -IC:\ninja\libs\build\dist\include -IC:\ninja\libs\build\dist\include\QtCore -IC:\ninja\libs\build\dist\mkspecs\win32-msvc2015 -IC:\ninja\source\src\external -IC:\ninja\source\src\card\base -IC:\ninja\source\src\activation -IC:\ninja\source\src\settings -IC:\ninja\source\src\network -IC:\ninja\libs\build\dist\include\QtNetwork -IC:\ninja\libs\build\dist\include\QtXml -IC:\ninja\libs\build\dist\include\QtGui -IC:\ninja\libs\build\dist\include\QtWidgets -IC:\ninja\libs\build\dist\include\QtQml -IC:\ninja\libs\build\dist\include\QtQuick -DVERSION_MAJOR=1 -DVERSION_MINOR=4 -DVERSION_PATCH=3 -DVERSION_TWEAK=0 -DVERSION=1.0.0+67-stable -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MESSAGELOGCONTEXT -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_QML_LIB -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DUNICODE -DUSE_DESKTOP_WIDGETS -DUSE_WINDOWS_WIDGETS /fosrc\CMakeFiles\Application.dir\__\resources\windows.rc.res C:\ninja\source\resources\windows.rc
ninja: fatal: CreateProcess: Falscher Parameter.
TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0015088closedKitware Robot Ninja generator makes an invalid RC_COMPILER rule 

  Notes
(0039327)
A. Klitzing (reporter)
2015-08-26 09:21

rules.ninja:

rule RC_COMPILER__Application
  depfile = $DEP_FILE
  deps = gcc
  command = "" RC $in "$DEP_FILE" $out "" "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe" C:\PROGRA~2\WI3CF2~1\8.1\bin\x86\rc.exe $FLAGS $DEFINES /fo$out $in
  description = Building RC object $out


Is "deps = gcc" correct? Compiler is MSVC. If I change it to msvc it is still broken.


It looks like this:
https://public.kitware.com/Bug/view.php?id=15088 [^]
(0039328)
A. Klitzing (reporter)
2015-08-26 09:37

Ok, I found the problem.

http://www.cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/CMakeClDeps.cmake [^]

It will check and use CMAKE_C_COMPILER only. But there is no CMAKE_C_COMPILER for a CXX project. If I change it here in CMakeClDeps to CMAKE_CXX_COMPILER it works!
Of course... it must work for both. ;-)
(0039336)
Brad King (manager)
2015-08-27 09:04

Resolving as duplicate of 0015088 but I also linked from there to the discussion here.
(0040127)
Robert Maynard (manager)
2016-01-04 11:52

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-08-26 07:01 A. Klitzing New Issue
2015-08-26 09:21 A. Klitzing Note Added: 0039327
2015-08-26 09:37 A. Klitzing Note Added: 0039328
2015-08-27 09:03 Brad King Relationship added duplicate of 0015088
2015-08-27 09:04 Brad King Note Added: 0039336
2015-08-27 09:04 Brad King Status new => resolved
2015-08-27 09:04 Brad King Resolution open => duplicate
2016-01-04 11:52 Robert Maynard Note Added: 0040127
2016-01-04 11:52 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team