[CMake] Removing debug and optimized prefixes
Eric Noulard
eric.noulard at gmail.com
Thu Aug 15 07:57:45 EDT 2013
2013/8/15 Alvaro Aguilera <alvaro.aguilera at gmail.com>:
> Hello,
>
> I'm using cmake 2.8.11.2 under Linux to compile a small shared library.
> The problem I have is that the cmake's link command prefixes some of the
> libraries with "debug" and "optimized":
>
> (...) -loptimized /usr/local/lib64/libprotobuf.so -ldebug
> /usr/local/lib64/libprotobuf.so -ldebug -Wl (...)
Could you sow us the corresponding CMakeLists.txt?
At least the part containing add_library and target_link_libraries
statement.
CMake seems to believe that "debug" and "optimized"
are library names and not keywords from
the target_link_library.
>
> the linker isn't aware of the prefixes and gives and error:
>
> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld:
> cannot find -loptimized
> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld:
> cannot find -ldebug
>
> Any idea how to fix this issue?
>
> Thanks,
> Alvaro
>
>
> --
>
> 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
--
Erk
L'élection n'est pas la démocratie -- http://www.le-message.org
More information about the CMake
mailing list