MantisBT - CMake
View Issue Details
0013986CMakeCMakepublic2013-03-06 08:312013-10-07 10:03
Benjamin Kloster 
Stephen Kelly 
normalmajoralways
closedfixed 
Ubuntu12.04 x64
CMake 2.8.10.2 
CMake 2.8.11CMake 2.8.11 
0013986: Target names may not contain a plus sign anymore
Since the latest revision in Git (commit efdf152), CMake balks at targets with a plus sign in their name. Since it's a common practice to name C++ wrapper of some libraries as MyLib++, that's a little strange. Attached is a diff that adds the plus sign to the regex used to verify target names.
Invoke CMake with a CMakeLists.txt containing:

add_executable(mylib++ ${SOURCE_FILES})

It will fail with the error message "Target name not supported"
See also: http://www.mail-archive.com/cmake@cmake.org/msg45517.html [^]
No tags attached.
diff allow_plus_sign.diff (637) 2013-03-06 08:31
https://public.kitware.com/Bug/file/4667/allow_plus_sign.diff
Issue History
2013-03-06 08:31Benjamin KlosterNew Issue
2013-03-06 08:31Benjamin KlosterFile Added: allow_plus_sign.diff
2013-03-06 08:55Brad KingAssigned To => Stephen Kelly
2013-03-06 08:55Brad KingStatusnew => assigned
2013-03-06 08:55Brad KingTarget Version => CMake 2.8.11
2013-03-06 11:00Stephen KellyNote Added: 0032521
2013-03-06 11:07Stephen KellyNote Added: 0032522
2013-03-07 02:07Rolf Eike BeerNote Added: 0032527
2013-03-07 04:38Stephen KellyNote Added: 0032528
2013-03-13 11:46Stephen KellyNote Added: 0032602
2013-03-13 11:46Stephen KellyStatusassigned => resolved
2013-03-13 11:46Stephen KellyFixed in Version => CMake 2.8.11
2013-03-13 11:46Stephen KellyResolutionopen => fixed
2013-10-07 10:03Robert MaynardNote Added: 0033995
2013-10-07 10:03Robert MaynardStatusresolved => closed

Notes
(0032521)
Stephen Kelly   
2013-03-06 11:00   
Hi,

Thanks for the report and the patch.

I tried reproducing the problem with the snippet you provided, but it doesn't fail for me. Is there something else needed?

Thanks,

Steve.
(0032522)
Stephen Kelly   
2013-03-06 11:07   
Ah, I have to create a second target and link to the first one.
(0032527)
Rolf Eike Beer   
2013-03-07 02:07   
Stephen, as you found out that those target names are illegal with the borland compiler anyway, would it make sense to give a proper error message (from CMake) when generating for Borland instead of letting everything pass through and later fail with some compiler error message where the reason is hard to guess?
(0032528)
Stephen Kelly   
2013-03-07 04:38   
I wouldn't object to such a patch, but I don't think it's really in scope for this bug.
(0032602)
Stephen Kelly   
2013-03-13 11:46   
Please file a separate feature request for the Borland issue if you wish.
(0033995)
Robert Maynard   
2013-10-07 10:03   
Closing resolved issues that have not been updated in more than 4 months.