The following issue has been SUBMITTED. ====================================================================== https://cmake.org/Bug/view.php?id=15952 ====================================================================== Reported By: Chaoren Lin Assigned To: ====================================================================== Project: CMake Issue ID: 15952 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2016-02-03 20:13 EST Last Modified: 2016-02-03 20:13 EST ====================================================================== Summary: '$' 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 $$. ====================================================================== 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 ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
