MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0015744 | CMake | CMake | public | 2015-09-15 13:21 | 2016-05-02 08:30 |
| Reporter | Thiago M. | ||||
| Assigned To | Clinton Stimpson | ||||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Platform | OS | Red Hat Enterprise Linux | OS Version | 6 | |
| Product Version | CMake 3.3.1 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0015744: Spaces in paths with non-ASCII characters are not escaped when using Ninja | ||||
| Description | When using CMake with the Ninja generator to build some source code that is inside a path that contains both spaces and non-ASCII characters, the path is used without escaping the spaces inside the generated Ninja rules files. | ||||
| Steps To Reproduce | 1) Create a sources folder in a path which contains both spaces and non-ASCII characters. Ex: `make /tmp/CMake Ninja Spaces/Código` 2) Inside the source folder, create a `CMakeLists.txt` with an `add_executable(main main.cpp)`. 3) Run CMake using the Ninja generator. 4) Check the generated `build.ninja` file. It should have spaces in paths escaped with `$`, like: build CMakeFiles/CMakeNinjaSpaces.dir/main.cpp.o: CXX_COMPILER__CMakeNinjaSpaces /tmp/CMake$ Ninja$ Spaces/Código/main.cpp However, it has variables names `identX` with unescaped paths: ident0 = /tmp/CMake Ninja Spaces/Código/main.cpp build CMakeFiles/CMakeNinjaSpaces.dir/main.cpp.o: CXX_COMPILER__CMakeNinjaSpaces $ident0 | ||||
| Additional Information | The unescaped paths make Ninja rebuild and relink everything whenever it runs, making incremental builds and the edit-build-test cicle impossible. Steps to reproduce (cont.): 5) Run Ninja on the generated `build.ninja` file. It outputs the progress of files being build: [1/2] Building CXX object CMakeFiles/CMakeNinjaSpaces.dir/main.cpp.o [2/2] Linking CXX executable CMakeNinjaSpaces 6) Run Ninja again. It should do nothing and print: `ninja: no work to do.` However, it does rebuild and relink everything, showing again the progress messages described in step 5. | ||||
| Tags | ninja, Unicode | ||||
| Relationships | |||||
| Attached Files | https://public.kitware.com/Bug/file/5528/* | ||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2015-09-15 13:21 | Thiago M. | New Issue | |||
| 2015-09-15 13:21 | Thiago M. | File Added: build.ninja | |||
| 2015-09-15 13:31 | Thiago M. | Tag Attached: ninja | |||
| 2015-09-15 13:31 | Thiago M. | Tag Attached: Unicode | |||
| 2016-01-01 23:26 | Clinton Stimpson | Note Added: 0040037 | |||
| 2016-01-04 07:15 | Thiago M. | Note Added: 0040049 | |||
| 2016-01-05 23:31 | Clinton Stimpson | Status | new => resolved | ||
| 2016-01-05 23:31 | Clinton Stimpson | Resolution | open => no change required | ||
| 2016-01-05 23:31 | Clinton Stimpson | Assigned To | => Clinton Stimpson | ||
| 2016-05-02 08:30 | Robert Maynard | Note Added: 0040991 | |||
| 2016-05-02 08:30 | Robert Maynard | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||