[cmake-developers] [CMake 0011658]: CMake Eclipse CDT4 project generator can generate invalid XML
Mantis Bug Tracker
mantis at public.kitware.com
Wed Jan 5 07:08:22 EST 2011
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=11658
======================================================================
Reported By: zub
Assigned To:
======================================================================
Project: CMake
Issue ID: 11658
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2011-01-05 07:08 EST
Last Modified: 2011-01-05 07:08 EST
======================================================================
Summary: CMake Eclipse CDT4 project generator can generate
invalid XML
Description:
Eclipse CD4 project generator does not escape include paths that are put into
the resulting .cproject XML file. Thus, if there is an include path specified
that contains an XML-unsafe character, the resulting .cproject file is not a
valid XML file.
Steps to Reproduce:
I observed this in Linux. I'm not sure how do Windows cope with such odd
directory names. Either way CMake should always produce valid XML file.
1. specify an odd include directory like '&inc' in CMakeLists.txt
2. generate Eclipse CDT4 project (-G "Eclipse CDT4 - Unix Makefiles")
3. look into the resulting .cproject XML file
The attached testcase results in this:
testcase$ xmllint .cproject
.cproject:158: parser error : EntityRef: expecting ';'
<pathentry include="/home/user/tmp/cmake-test/testcase/&inc" kind="inc" path=""
^
Additional Information:
Alternatively just unpack the attached testcase.tar.gz and run
./generate-eclipse-project.
The makefiles generated work correctly, but the .cproject file is invalid.
Escaping the data in the .cproject file would solve this issue.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-01-05 07:08 zub New Issue
2011-01-05 07:08 zub File Added: testcase.tar.gz
======================================================================
More information about the cmake-developers
mailing list