The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15001
======================================================================
Reported By: George Sakhnovsky
Assigned To:
======================================================================
Project: CMake
Issue ID: 15001
Category: CMake
Reproducibility: always
Severity: minor
Priority: low
Status: new
======================================================================
Date Submitted: 2014-07-01 17:11 EDT
Last Modified: 2014-07-01 17:11 EDT
======================================================================
Summary: add_custom_command: inconsistent treatment of
escaped quotes
Description:
I have an add_custom_command COMMAND line where I want to wrap several of the
strings in double quotes.
cmake src snippet:
add_custom_command(
TARGET ${target_name}
PRE_BUILD
COMMAND "\"$(DevEnvDir)tf\"" history "\"$(SolutionDir)\""
/stopafter:1 /recursive > changeset.dat
The generated vcxproj file looks as follows. Note that the escaped double quotes
made it through quite literally:
\"$(DevEnvDir)tf\" history "$(SolutionDir)" /stopafter:1 /recursive >
changeset.dat
The desired behavior is to have $(DevEnvDir)tf wrapped in double quotes like so:
"$(DevEnvDir)tf" history "$(SolutionDir)" /stopafter:1 /recursive >
changeset.dat
Why does escaping double quotes work for the second string in the line but not
the first? Should this be accomplished differently for the first string because
it's the actual command? If this is not a bug, what's the workaround?
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-07-01 17:11 George SakhnovskyNew Issue
======================================================================
--
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