You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default CMake behaviour for GNU toolchains will build static libraries using ar qc followed by ranlib. This recipe does not support the archive presentation improvements introduced in #630. I have been able to demonstrate the enhanced presentation in the context of a CDT CMake project by adding the following CMake commands:
# create archives with index and full path information
set(CMAKE_ASM_ARCHIVE_CREATE "<CMAKE_AR> qcsP <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcsP <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcsP <TARGET> <LINK_FLAGS> <OBJECTS>")
# append to archives with index and full path information
set(CMAKE_ASM_ARCHIVE_APPEND "<CMAKE_AR> qsP <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> qsP <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> qsP <TARGET> <LINK_FLAGS> <OBJECTS>")
# do not invoke ranlib - it removes full path information
set(CMAKE_ASM_ARCHIVE_FINISH "")
set(CMAKE_C_ARCHIVE_FINISH "")
set(CMAKE_CXX_ARCHIVE_FINISH "")
Should we provide some sort of "CDT support" CMake file for those users who want to take advantage of the enhanced presentation? This could be part of the project, to allow use from other IDEs or the command line, and enabled by default via a command in the CMakeLists.txt file such as include(CDTsupport.cmake OPTIONAL). Ideally, there would be an easy way to add this support to CMake projects imported into CDT from elsewhere.
The text was updated successfully, but these errors were encountered:
The default CMake behaviour for GNU toolchains will build static libraries using
ar qc
followed byranlib
. This recipe does not support the archive presentation improvements introduced in #630. I have been able to demonstrate the enhanced presentation in the context of a CDT CMake project by adding the following CMake commands:Should we provide some sort of "CDT support" CMake file for those users who want to take advantage of the enhanced presentation? This could be part of the project, to allow use from other IDEs or the command line, and enabled by default via a command in the
CMakeLists.txt
file such asinclude(CDTsupport.cmake OPTIONAL)
. Ideally, there would be an easy way to add this support to CMake projects imported into CDT from elsewhere.The text was updated successfully, but these errors were encountered: