[CMake] Can't build target with '+' in name (win32, msvc)

Bill Hoffman bill.hoffman at kitware.com
Mon Jul 23 16:59:55 EDT 2007


Christian Ehrlicher wrote:
> Hi,
>
> due to recent changes in kdepimlibs, I hit an error in cmake. It's 
> impossible to create this target due to problems in the generated 
> Makefile:
>
> -------------------------8<----------------
> # Object files for target gpgme++
> gpgme++_OBJECTS = \
> "CMakeFiles\gpgme++.dir\gpgme++_automoc.obj" \
> "CMakeFiles\gpgme++.dir\context.obj" \
> "CMakeFiles\gpgme++.dir\key.obj" \
> "CMakeFiles\gpgme++.dir\trustitem.obj" \
> "CMakeFiles\gpgme++.dir\data.obj" \
> "CMakeFiles\gpgme++.dir\callbacks.obj" \
> "CMakeFiles\gpgme++.dir\eventloopinteractor.obj" \
> "CMakeFiles\gpgme++.dir\keylistresult.obj" \
> "CMakeFiles\gpgme++.dir\keygenerationresult.obj" \
> "CMakeFiles\gpgme++.dir\importresult.obj" \
> "CMakeFiles\gpgme++.dir\decryptionresult.obj" \
> "CMakeFiles\gpgme++.dir\verificationresult.obj" \
> "CMakeFiles\gpgme++.dir\signingresult.obj" \
> "CMakeFiles\gpgme++.dir\encryptionresult.obj" \
> "CMakeFiles\gpgme++.dir\engineinfo.obj"
> -------------------------8<----------------
>
> nmake throws an error here.
> gpgme++\CMakeFiles\gpgme++.dir/build.make(559) : fatal error U1001: 
> syntax error : illegal character "+" in macro
>
>
> It would be nice to solve it asap - the best solution would be to 
> rename the lib back to gpgmepp until cmake is fixed.
You might be able to do this until it is fixed:

add_library(gpgmepp ...)
set_target_properties(gpgmepp OUTPUT_NAME gpgme++)

-Bill



More information about the CMake mailing list