MantisBT - CMake
View Issue Details
0012283CMakeCMakepublic2011-06-16 15:072012-02-06 06:07
Jérôme Gardou 
Brad King 
normaltweakalways
closedfixed 
MinGWWindowsall
CMake 2.8.4 
CMake 2.8.6CMake 2.8.6 
0012283: Cmake -E echo kills performance of MinGW Makefiles
Instead of '@echo some text', MinGW Makefiles generator use '@cmake -E echo "some text"'

Quoting cmake source code comment :

// mingw32-make has trouble running code like
//
// @echo message with spaces
//
// If quotes are added
//
// @echo "message with spaces"
//
// it runs but the quotes are displayed. Instead just use cmake to
// echo.

which I am unable to confirm. Maybe an old version of mingw32-make?

Furthermore, using @echo avoids garbage output in case of a parallel build

Please find patch attached :-)
Just trigger a mingw32-make help into the build directory of a library, and benchmark it with/without the patch. I can see the difference even with a medium sized library.
No tags attached.
related to 0011304closed Kitware Robot Makefiles ignores CMAKE_RULE_MESSAGES / RULE_MESSAGES 
patch 0004-MinGW-Makefile-Generator-use-native-echo-command.patch (1,171) 2011-06-16 15:07
https://public.kitware.com/Bug/file/3944/0004-MinGW-Makefile-Generator-use-native-echo-command.patch
Issue History
2011-06-16 15:07Jérôme GardouNew Issue
2011-06-16 15:07Jérôme GardouFile Added: 0004-MinGW-Makefile-Generator-use-native-echo-command.patch
2011-06-16 15:27Brad KingNote Added: 0026882
2011-06-16 15:27Brad KingStatusnew => backlog
2011-06-16 15:30Brad KingNote Added: 0026883
2011-06-16 15:36Jérôme GardouNote Added: 0026884
2011-06-16 15:55Brad KingAssigned To => Brad King
2011-06-16 15:55Brad KingStatusbacklog => assigned
2011-06-16 15:57Brad KingNote Added: 0026885
2011-06-16 15:58Brad KingRelationship addedrelated to 0011304
2011-09-07 09:55Brad KingNote Added: 0027391
2011-09-07 09:55Brad KingStatusassigned => resolved
2011-09-07 09:55Brad KingResolutionopen => fixed
2011-09-07 09:55Brad KingFixed in Version => CMake 2.8.6
2011-09-07 09:55Brad KingTarget Version => CMake 2.8.6
2012-02-06 06:07David ColeNote Added: 0028496
2012-02-06 06:07David ColeStatusresolved => closed

Notes
(0026882)
Brad King   
2011-06-16 15:27   
Some history:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e92f0b4 [^]
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69356d8a [^]

The mingw32-make behavior persists even today. It is actually a Windows shell behavior.

> type foo.make
all:
        @echo "tada"

> mingw32-make -f foo.make
"tada"

> mingw32-make --version
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010 Free Software Foundation, Inc.
(0026883)
Brad King   
2011-06-16 15:30   
While the quoting behavior persists I do not see the echo-with-spaces-but-no-quotes behavior anymore.
(0026884)
Jérôme Gardou   
2011-06-16 15:36   
I don't question the remark about the quotes, but I don't experience any problem with something like :

@echo pim pam poum
(0026885)
Brad King   
2011-06-16 15:57   
On my machine all CMake's tests pass using native echo and modern mingw32-make.

Since this was the only use of the "NativeEcho" infrastructure I removed all of it:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b4d3ad3 [^]

If only I wrote better commit messages back when the original change was made perhaps we would know more about the original problem.
(0027391)
Brad King   
2011-09-07 09:55   
CMake 2.8.6-rc* contain the fix linked in 0012283:0026885.
(0028496)
David Cole   
2012-02-06 06:07   
Closing resolved issues that have not been updated in more than 4 months.