MantisBT - CMake
View Issue Details
0015617CMakeModulespublic2015-06-15 08:432016-06-10 14:31
Florian Reinhard 
Kitware Robot 
normalmajoralways
closedmoved 
CMake 3.2.3 
 
0015617: When assembler is enabled TI Compiler might end up with wrong archiver
If "ENABLE(ASM)" is used in a TI-Toolchain project and something named ar(.exe) is present in your path, this archiver (ar) will be used and not the TI toolchain's ar6x!

Here's why:
CMakeDetermineCCompiler.cmake (line 153, [1]) and CMakeDetermineCXXCompiler.cmake have some special code/regex to get the toolchain prefix and suffix. CMakeDetermineASMCompiler.cmake does not contain this code.


What happeens?
- The ASM Compiler is processed, pre- and suffix are empty.
- CMakeFindBinUtils.cmake is processed and CMAKE_AR is filled witht he wrong archiver
- Subsequent languages (c/cxx) will not overwrite the wrong CMAKE_AR setting.
I managed to reproduce this easily on multiple machines (all windows):
1. Get a regular archiver named "ar" in your path. On windows something named ar.exe should do the trick
2. setup a project that uses the TI Toolchain
3. use ENABLE(ASM) in yourproject
[1] http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeDetermineCCompiler.cmake;h=937aa8c3efe6a83acbc751aee527b7409f68b300;hb=refs/heads/master#l153 [^]
No tags attached.
Issue History
2015-06-15 08:43Florian ReinhardNew Issue
2016-06-10 14:29Kitware RobotNote Added: 0042796
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042796)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.