| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0015612 | CMake | CMake | public | 2015-06-12 06:38 | 2016-06-10 14:31 | ||||
| Reporter | tim blechmann | ||||||||
| Assigned To | Kitware Robot | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | moved | ||||||
| Platform | Windows | OS | OS Version | ||||||
| Product Version | CMake 3.2.1 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0015612: ninja generator: "The command line is too long" | ||||||||
| Description | i'm adding many POST_BUILD steps via add_custom_command. at one point, ninja builds fail with "The command line is too long"" apparently cmLocalNinjaGenerator::BuildCommandLine simply concatenates various commands via " && " without checking, whether the command line is too long. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0038924) Brad King (manager) 2015-06-15 09:13 |
Corresponding mailing list thread: Custom commands with Ninja on Windows http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/13434 [^] |
|
(0039374) tim blechmann (reporter) 2015-09-09 09:21 |
i'm also seeing this with normal targets (c++ object file rules), if there are many include paths |
|
(0041067) Martin Ankerl (reporter) 2016-05-17 06:30 |
I have just signed up here to report this bug as well. Windows has a limit of 8191 characters, see here: https://support.microsoft.com/en-us/kb/830473 [^] In a target we have lots of custom commands to copy files, and this generates a very long command which does not work. |
|
(0041071) Martin Ankerl (reporter) 2016-05-18 04:23 |
I had a look at how best to solve this. A solution would be to use a response file (rspfile and rspfile_content), but it is currently not possible to have multiple lines in the response file. So ninja needs to be extended to be usable like this. Another solution is to output a build target for each custom command, and add dependencies to these custom commands. E.g. instead of ---------------- build CMakeFiles\copy_czmq_3.0.2.util: CUSTOM_COMMAND COMMAND = cmd.exe /C "cd /D C:\dev\ras_robvis\vc140_x64_ninja && "c:\Program Files (x86)\CMake\bin\cmake.exe" -E copy_if_different "C:/dev/ras_robvis/src/ext/lib_czmq/3.0.2/vc140_x64/czmq.dll" "C:/dev/ras_robvis/vc140_x64_ninja/bin/./czmq.dll" && cd /D C:\dev\ras_robvis\vc140_x64_ninja && "c:\Program Files (x86)\CMake\bin\cmake.exe" -E copy_if_different "C:/dev/ras_robvis/src/ext/lib_czmq/3.0.2/vc140_x64/czmqd.dll" "C:/dev/ras_robvis/vc140_x64_ninja/bin/./czmqd.dll"" DESC = Running utility command for copy_czmq_3.0.2 restat = 1 build copy_czmq_3.0.2: phony CMakeFiles\copy_czmq_3.0.2.util ---------------- output this: ---------------- build CMakeFiles\copy_czmq_3.0.2.util.1: CUSTOM_COMMAND COMMAND = cmd.exe /C "cd /D C:\dev\ras_robvis\vc140_x64_ninja && "c:\Program Files (x86)\CMake\bin\cmake.exe" -E copy_if_different "C:/dev/ras_robvis/src/ext/lib_czmq/3.0.2/vc140_x64/czmq.dll" "C:/dev/ras_robvis/vc140_x64_ninja/bin/./czmq.dll"" restat = 1 build CMakeFiles\copy_czmq_3.0.2.util.2: CUSTOM_COMMAND COMMAND = cmd.exe /C "cd /D C:\dev\ras_robvis\vc140_x64_ninja && "c:\Program Files (x86)\CMake\bin\cmake.exe" -E copy_if_different "C:/dev/ras_robvis/src/ext/lib_czmq/3.0.2/vc140_x64/czmqd.dll" "C:/dev/ras_robvis/vc140_x64_ninja/bin/./czmqd.dll"" restat = 1 build CMakeFiles\copy_czmq_3.0.2.util: phony | CMakeFiles\copy_czmq_3.0.2.util.1 CMakeFiles\copy_czmq_3.0.2.util.2 DESC = Running utility command for copy_czmq_3.0.2 build copy_czmq_3.0.2: phony CMakeFiles\copy_czmq_3.0.2.util ---------------- |
|
(0041072) Brad King (manager) 2016-05-18 08:59 |
Re 0015612:0041071: Please see discussion in the thread linked in 0015612:0038924. If you are interested in working on this please join the dev list: https://cmake.org/mailman/listinfo/cmake-developers [^] and raise it for discussion there. |
|
(0042793) Kitware Robot (administrator) 2016-06-10 14:29 |
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. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2015-06-12 06:38 | tim blechmann | New Issue | |
| 2015-06-15 09:13 | Brad King | Note Added: 0038924 | |
| 2015-09-09 09:21 | tim blechmann | Note Added: 0039374 | |
| 2016-05-17 06:30 | Martin Ankerl | Note Added: 0041067 | |
| 2016-05-18 04:23 | Martin Ankerl | Note Added: 0041071 | |
| 2016-05-18 08:59 | Brad King | Note Added: 0041072 | |
| 2016-06-10 14:29 | Kitware Robot | Note Added: 0042793 | |
| 2016-06-10 14:29 | Kitware Robot | Status | new => resolved |
| 2016-06-10 14:29 | Kitware Robot | Resolution | open => moved |
| 2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot |
| 2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |