[CMake] building a library named 'general'

Michael DiCuccio dicuccio at gmail.com
Wed Nov 20 16:08:45 EST 2013


Yes, that works.


On Tue, Nov 19, 2013 at 7:21 PM, Matthew Woehlke <
matthew.woehlke at kitware.com> wrote:

> On 2013-11-19 19:07, Michael DiCuccio wrote:
>
>> Suppose you have a library named general:
>>
>> -----
>> add_library(general foo bar)
>> -----
>>
>> ....and then try to link it into an application:
>>
>> -----
>> add_executable(myapp baz)
>> target_link_libraries(myapp general)
>> -----
>>
>> cmake complains about the fact that 'general' is a reserved keyword, and I
>> have found no way to force or finagle linkage against a library named
>> 'libgeneral'.
>>
>
> Name the target something else (e.g. 'libgeneral') and modify its
> OUTPUT_NAME? (See set_target_properties and the OUTPUT_NAME property.)
>
> If all you need is to produce a 'libgeneral.so', that may suffice. If you
> also need the target name to be 'general'...
>
> --
> Matthew
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131120/2b388e04/attachment.htm>


More information about the CMake mailing list