View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008727CMakeCMakepublic2009-03-12 00:262016-06-10 14:30
ReporterDerek Bruening 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0008727: quoted commands in nmake makefiles mess up command parameters
DescriptionThere is a bug in nmake that appears if these conditions are met:

1) A command is enclosed in quotes
2) The first parameter to that command contains a /

nmake adds a space prior to the first / in the first parameter, if the command is in quotes. This messes up custom commands invoking ${CMAKE_COMMAND} with -D arguments with no space after the D, and perl commands, etc. where the 1st parameter is a path.

When cmake is first invoked with an 8.3 path, it uses that path initially for CMAKE_COMMAND, but on any later re-build of the generated makefiles, it switches to the full installed name, which typically has a space in it and thus becomes quoted.

I suggest that cmake use 8.3 paths in nmake commands, instead of quoting commands with spaces. If 8.3 names are disabled on the local NTFS, an alternative is to use cmd /c "command with spaces".

To see the nmake bug in action try the Makefile below.

# Test case for issue 0000084
# This is a bug in nmake.exe where nmake adds space before 1st / in
# 1st arg to a command, if that command is invoked with quotes.
# Observe:
# % nmake /nologo noquotes
# back\forward/slash second/arg
# % nmake /nologo quotes
# back\forward /slash second/arg
# % nmake /nologo quotescmd
# back\forward/slash second/arg
# This behavior is present in all versions I've tested:
# 8.00.50727.762
# 7.10.3077
# 6.00.8168.0
.PHONY : noquotes quotes quotescmd
noquotes:
    @e:/cygwin/bin/echo back\forward/slash second/arg
quotes:
    @"e:/cygwin/bin/echo" back\forward/slash second/arg
quotescmd:
    @cmd /c "e:/cygwin/bin/echo" back\forward/slash second/arg
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0030539)
Brad King (manager)
2012-08-13 10:37

Sending issues I'm not actively working on to the backlog to await someone with time for them.

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it:

 http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
(0041515)
Kitware Robot (administrator)
2016-06-10 14:27

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2009-03-12 00:26 Derek Bruening New Issue
2009-03-15 22:21 Bill Hoffman Status new => assigned
2009-03-15 22:21 Bill Hoffman Assigned To => Brad King
2012-08-13 10:37 Brad King Status assigned => backlog
2012-08-13 10:37 Brad King Note Added: 0030539
2016-06-10 14:27 Kitware Robot Note Added: 0041515
2016-06-10 14:27 Kitware Robot Status backlog => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:30 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team