View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013140 | CMake | CMake | public | 2012-04-17 16:34 | 2014-06-02 08:37 | ||||
Reporter | Erik Jensen | ||||||||
Assigned To | Stephen Kelly | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Windows 7 x64 | OS | OS Version | ||||||
Product Version | CMake 2.8.7 | ||||||||
Target Version | Fixed in Version | CMake 3.0 | |||||||
Summary | 0013140: CMake does not reject unsupported logical target names | ||||||||
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. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0029212) Brad King (manager) 2012-04-18 10:04 |
We don't intend to support code like add_executable("exe name with spaces" ...) directly. The bug is that this is not rejected with a nice error. We'll need to add a CMake Policy to restrict logical target names to some supported set. Meanwhile if you want an executable with a space in its name then create it like this: add_executable(exe_name_with_spaces ...) set_property(TARGET exe_name_with_spaces PROPERTY OUTPUT_NAME "exe name with spaces") |
(0034428) Stephen Kelly (developer) 2013-11-08 17:11 |
Done: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05f5fde0 [^] |
(0036008) Robert Maynard (manager) 2014-06-02 08:37 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-04-17 16:34 | Erik Jensen | New Issue | |
2012-04-18 10:04 | Brad King | Note Added: 0029212 | |
2012-04-18 10:04 | Brad King | Status | new => backlog |
2012-04-18 10:04 | Brad King | Summary | Invaled NMake makefiles generated when target name contains spaces => CMake does not reject unsupported logical target names |
2013-11-08 17:11 | Stephen Kelly | Note Added: 0034428 | |
2013-11-08 17:11 | Stephen Kelly | Status | backlog => resolved |
2013-11-08 17:11 | Stephen Kelly | Fixed in Version | => CMake 3.0 |
2013-11-08 17:11 | Stephen Kelly | Resolution | open => fixed |
2013-11-08 17:11 | Stephen Kelly | Assigned To | => Stephen Kelly |
2014-06-02 08:37 | Robert Maynard | Note Added: 0036008 | |
2014-06-02 08:37 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |