[CMake] Unicode path wrecks havoc with VS2013 generator

Nagy-Egri Máté Ferenc nagymatef at freemail.hu
Tue Nov 12 18:07:35 EST 2013


I have tried to open the solution by the IDE itself, but that fails to load the solution also. It report the same error while trying to load the projects inside.


Shall I rebuild CMake with the mentioned patch to make it work, or can I hope of a patch that solves this problem?






Feladó: clinton at elemtech.com
Elküldve: ‎szombat‎, ‎2013‎. ‎november‎ ‎9‎. ‎7‎:‎14
Címzett: cmake at cmake.org







----- Original Message -----
> On 11/8/2013 4:48 AM, Nagy-Egri Máté Ferenc wrote:
> > Hi!
> >
> > I have the following issue, which I do not know whether it is an issue
> > of CMake or Visual Studio. When I try to generate a Visual Studio
> > project under a path that contains unicode characters, VS fails to
> > compile the simple test file and thus CMake terminates project
> > generation. Visual Studio does have some issues with projects under
> > unicode paths, but generally things work. (For eg. the C++AMP call tree
> > generator breaks, therefore no C++AMP project can be built in such
> > paths) I develop all my applications in my Skydrive folder which is
> > under the Users folder, and since my name holds unicode characters, I
> > have no control over mw home folder under Win 8 if I have a Live-ID user
> > in the OS. This is what happens:
> Clearly you need to change your name.  :)
> 
> Can you create a simple project from the IDE in that directory and get
> it to work?
> 
> If you run CMake with --debug-trycompile, can you load the solution in
> the CMakeTmp directory from the IDE?
> 

This problem can also be reproduced with English as the current language.
Just pick a character between 128 and 256 to include in the name of the build directory.
For example, buildñ, and run cmake in there pointing to any source tree.

For me, the Visual Studio 9 2008 generator works fine and the project file reports an encoding of Windows-1252.
It fails with the the Visual Studio 10 generator where the project file reports a utf-8 encoding, but it really isn't utf-8.
So I get errors like this:
 C:\...\cmake\buildñ\CMakeFiles\CMakeTmp\cmTryCompileExec926
91608.vcxproj(56,110):
 error MSB4025: The project file could not be loaded.  Invalid character in
 the given encoding.  Line 56, position 110.

Modifying cmVisualStudio10TargetGenerator.cxx to set the encoding of the visual studio file to Windows-1252 instead of utf-8 fixes the problem for me.

Clint
--

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://www.cmake.org/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131112/d09af942/attachment.htm>


More information about the CMake mailing list