[CMake] cmake-2.8.12: generator expression error when linker flags have comma

Stephen Kelly steveire at gmail.com
Mon Oct 21 04:45:15 EDT 2013


Jed Brown wrote:

> Stephen Kelly <steveire at gmail.com> writes:
> 
>> Jed Brown wrote:
>>
>>> I just upgraded from cmake-2.8.11.2 to 2.8.12 and now get errors when a
>>> comma ',' appears in a linker flag.  Test case below.  Note that this is
>>> but one of many reasons for a comma to appear in linker flags.
>>
>> I've pushed a fix candidate:
>>
>>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3eeb83d147030
> 
> Thanks.  Did the test case here really reproduce the problem on your
> end?  Putting essentially that line
> 
>   target_link_libraries(staticlib1 LINK_PRIVATE
>   "-L${CMAKE_CURRENT_BINARY_DIR} -Wl,--start-group -lstaticlib3
>   -Wl,--end-group")
> 
> in my test case did not trigger the error.

Yes, it produces the problem for me. Please try the unit test, or post a
full example using that line which does not show the problem.

> 
> I guess this will be in 2.8.12.1, whenever that is released?

I assume so too.

> 
>> Remember that the way to avoid bugs like this in the release is to test a
>> release candidate.
> 
> None of my current projects use CMake.  I encountered this issue while
> updating an interface to someone else's project that uses CMake.  I
> reduced the test case to rule out the possibility that it was a usage
> problem on his part and to make sure it was easy for you to reproduce so
> that it could be fixed quickly, but I don't see it as my responsibility
> to test release candidates of software that I don't use.

Ok, thanks for reporting!

Steve.




More information about the CMake mailing list