[cmake-developers] [CMake 0013591]: Ninja generator fail with multi-line COMMENT in custom command

Mantis Bug Tracker mantis at public.kitware.com
Tue Oct 16 07:04:53 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=13591 
====================================================================== 
Reported By:                Eric NOULARD
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13591
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-10-16 13:04 CEST
Last Modified:              2012-10-16 13:04 CEST
====================================================================== 
Summary:                    Ninja generator fail with multi-line COMMENT in
custom command
Description: 
If one uses a newline character "\n" in a COMMENT of a
custom command/target, the Nija generator will produce an
invalid build.ninja file.



Steps to Reproduce: 
$ cat CMakeLists.txt
cmake_minimum_required(VERSION 2.8)

project(NinjaCustomCommand NONE)

add_custom_target(GotYou ALL
  COMMAND ${CMAKE_COMMAND} -E echo \"Got You\"
  COMMENT "This may \n breaks Ninja")

$ mkdir b
$ cd b
$ cmake -G Ninja ..
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/erk/CMake/Contrib/NinjaAndCustomCommand/b
erk at CT-WDTIM102H:b$ ninja 
ninja: error: build.ninja:54: expected '=', got identifier
 breaks Ninja
        ^ near here

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-10-16 13:04 Eric NOULARD   New Issue                                    
======================================================================




More information about the cmake-developers mailing list