Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion conan_provider.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function(detect_lib_cxx LIB_CXX)
set(${LIB_CXX} "libstdc++${_CONAN_GNU_LIBSTDCXX_SUFFIX}" PARENT_SCOPE)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
set(${LIB_CXX} "libc++" PARENT_SCOPE)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
elseif((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "TIClang") AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
# Check for libc++
detect_libcxx()
if(_CONAN_IS_LIBCXX)
Expand Down Expand Up @@ -239,6 +239,10 @@ function(detect_compiler COMPILER COMPILER_VERSION COMPILER_RUNTIME COMPILER_RUN
set(_COMPILER "clang")
string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
list(GET VERSION_LIST 0 _COMPILER_VERSION)
elseif(_COMPILER MATCHES TIClang)
set(_COMPILER "ticlang")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be an issue. As the ticlang is not a built-in settings.yml, it will fail for Conan users. Maybe it should be added first there? Or why not just assimilating it to clang? Is it binary incompatible to clang? Different versioning? A bit of scope and extra info about this compiler would be nice

Copy link
Copy Markdown
Author

@sotten sotten Feb 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the settings.yml is generated by this script, right? https://github.com/conan-io/conan/blob/develop2/conans/client/conf/__init__.py

The TIClang, Texas Instruments (TI) calls it tiarmclang (ARM-CGT-CLANG), is used for embedded systems and is usually executed as cross-compiled. The compiler is based on clang currently clang 16, but uses its own version number (currently 3.2.2, it uses Semver). TI has enhanced the clang with its own features for improved debugging, smaller code size and so on.

I use cmake and the TI compiler to create Conan package with jfrog artifactory. Until now, a lot of manual work had to be done in cmake so that cmake could handle the compiler. Now that it is natively supported, I hope that conan will soon recognize the compiler and I can simplify my process.

This is the product page: https://www.ti.com/tool/ARM-CGT
The documentation for the compiler can be found here: https://software-dl.ti.com/codegen/docs/tiarmclang/compiler_tools_user_guide/
The pull request in cmake can be found here: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9228

string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
list(GET VERSION_LIST 0 _COMPILER_VERSION)
elseif(_COMPILER MATCHES GNU)
set(_COMPILER "gcc")
string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
Expand Down