Skip to content

Ninja: Using spaces in OUTPUT_NAME

Hello,

I have a project which generates a Shared Library (DLL) on Windows. Using SET_TARGET_PROPERTIES() with the property OUTPUT_NAME I set the name of the file to be My Shared File (Mind the spaces).

When I build the project using the MSVC Generator everything works perfectly. When I use the Ninja generator I get linking errors. Looking into build.ninja I can see the targets are named My$ Shared$ File.dll. Namely the parsing into the build file was wrong and the spaces were not handled correctly.

All errors disappear and project is built successfully with Ninja if I set OUTPUT_NAME to MySharedFile.

Edited by Kyle Edwards
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information