View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015952 | CMake | CMake | public | 2016-02-03 20:13 | 2016-06-10 14:31 | ||||
Reporter | Chaoren Lin | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 3.4.2 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015952: '$' becomes '$$' in compile_commands.json | ||||||||
Description | If your compile command contains a '$' character, it'll be incorrectly emitted as '$$' in compile_commands.json if CMAKE_EXPORT_COMPILE_COMMANDS is enabled. | ||||||||
Steps To Reproduce | 1) extract example.zip 2) cd example && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=True . 3) make VERBOSE=1 4) see that the compile command is /usr/bin/cc -DFOO="\"\$\"" -o CMakeFiles/foo.dir/foo.c.o -c /tmp/cmake/foo.c 5) open up compile_commands.json 6) see "command": "/usr/bin/cc -DFOO=\"\\\"\\$$\\\"\" -o CMakeFiles/foo.dir/foo.c.o -c /tmp/cmake/foo.c" which is wrong, since it should be $ instead of $$. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | example.zip [^] (457 bytes) 2016-02-03 20:13 | ||||||||
Relationships | |
Relationships |
Notes | |
(0040439) Brad King (manager) 2016-02-04 08:36 |
The compile commands are generated here: https://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefileTargetGenerator.cxx;hb=v3.4.3#l638 [^] Trace from there to see where it gets the values. Some of the code paths may be meant for generating Makefile content and is applying the relevant escapes. |
(0042932) 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 |
2016-02-03 20:13 | Chaoren Lin | New Issue | |
2016-02-03 20:13 | Chaoren Lin | File Added: example.zip | |
2016-02-04 08:36 | Brad King | Note Added: 0040439 | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042932 | |
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 |