Re: [CMake] building a library named 'general'
Yes, that works. On Tue, Nov 19, 2013 at 7:21 PM, Matthew Woehlke < matthew.woeh...@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 > -- 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
Re: [CMake] building a library named 'general'
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
[CMake] building a library named 'general'
Hi! I've come across an odd conundrum and need a little help resolving it. I'm porting a large toolkit to use CMake instead of an autoconf / configure-based makefile system. One problem we tripped across is a library named 'libgeneral.so', built as part of the toolkit itself. The trouble is that the syltax of a CMakeLists.txt file does not permit linking a library named general. 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'. Any ideas? -- 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