[cmake-developers] [CMake 0013140]: Invaled NMake makefiles generated when target name contains spaces

Mantis Bug Tracker mantis at public.kitware.com
Tue Apr 17 16:34:46 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13140 
====================================================================== 
Reported By:                Erik Jensen
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13140
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-04-17 16:34 EDT
Last Modified:              2012-04-17 16:34 EDT
====================================================================== 
Summary:                    Invaled NMake makefiles generated when target name
contains spaces
Description: 
I am migrating a project from Visual Studio to CMake that contains several
executables with spaces in their names. While the project builds fine when
generating Visual Studio project files, it fails to build when using NMake due
to invalid makefiles.

Steps to Reproduce: 
1. Create a project with an executable target containing a space.
2. Use CMake to create NMake files for the build.
3. Attempt to build.

Additional Information: 
It appears that the problem is caused by attempting to use the target name in
makefile macro names without replacing the space. For example if you have a
target named "Spiffy Command-Line Tool", build.make will contain a macro named
"Spiffy Command__Line Tool_OBJECTS".

Given that the hyphen is replaced by a double underscore, it looks like CMake
already does some name-mangling, it just doesn't handle spaces, currently.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-04-17 16:34 Erik Jensen    New Issue                                    
======================================================================




More information about the cmake-developers mailing list