Unless it is overridden somewhere else along the way, the following is
used to create the link command line for a C++ executable:
(found in Modules/CMakeCXXInformation.cmake)
if(NOT CMAKE_CXX_LINK_EXECUTABLE)
set(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS>
<LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
endif()
As you can see, by default, the C++ compiler is used as a front end to
link C++ executables...
Similarly for other types of targets, there are
CMAKE_CXX_CREATE_SHARED_LIBRARY and CMAKE_CXX_CREATE_SHARED_MODULE. And
for other languages, there are CMAKE_${LANG}_CREATE_... variables too.
In order to use the linker you want, you would have to define a custom
CMAKE_CXX_LINK_EXECUTABLE that uses "<CMAKE_LINKER>" in its definition
of the linker command line.
HTH,
David C.
--
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://public.kitware.com/mailman/listinfo/cmake