pavelliavonau/cmakeconverter

If the project name contains a space then it doesn't convert correctly

Adam-42 opened this issue · 2 comments

If the Visual Studio project name contains a space then it will fail to build after it has been converted.

I'm not all that familiar with CMake, but I think the CMakeLists.txt project line needs quotes putting in it, or maybe spaces replacing with underscores in that case. Something like:

project("Project Name With Spaces" cxx)

Cmakeconverter may have many issues like this. There is no straightforward solution for this. Project name may be used at different places. Fixing this may lead to issues at other usages. I feel that spaces are bad idea for project name.
You may investigate and propose the best solution you found.
At this stage I suggest you to fix source solution and convert again.

project("Project Name With Spaces" cxx)

leads to

The target name "Project Name With Spaces" is reserved or not valid for
certain CMake features, such as generator expressions, and may result in
undefined behavior.

with CMake 3.13

@Adam-42 , You had to check it by yourself. Do not waste my time, please.