[cmake-developers] [CMake 0015088]: Ninja generator makes an invalid RC_COMPILER rule

Mantis Bug Tracker mantis at public.kitware.com
Thu Aug 14 17:45:45 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=15088 
====================================================================== 
Reported By:                Frank Miller
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15088
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-08-14 17:45 EDT
Last Modified:              2014-08-14 17:45 EDT
====================================================================== 
Summary:                    Ninja generator makes an invalid RC_COMPILER rule
Description: 
When the project() command is used without C language support as in
project(myproj CXX), the ninja generator will create a rules.ninja file with an
empty string where cmcldeps.exe should be. Something like the following:

    rule RC_COMPILER
      depfile = $DEP_FILE
      deps = gcc
      command = "" RC $in "$DEP_FILE" $out "Note: including file: " "c:/Program
Files (x86)/Microsoft Visual Studio 12.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



Steps to Reproduce: 
The following patch will cause the MFC test to fail

diff --git a/Tests/MFC/CMakeLists.txt.in b/Tests/MFC/CMakeLists.txt.in
index e6bfabd..c1d0754 100644
--- a/Tests/MFC/CMakeLists.txt.in
+++ b/Tests/MFC/CMakeLists.txt.in
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 2.8)
-project(mfc1)
+project(mfc1 CXX)

 macro(replace_flags var these those)
   if("${${var}}" MATCHES "${these}")

Additional Information: 
This used to work in cmake 2.8.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-08-14 17:45 Frank Miller   New Issue                                    
======================================================================



More information about the cmake-developers mailing list