[cmake-developers] [CMake 0015973]: ASM-ATT: cannot set assembler using environment variable
Mantis Bug Tracker
mantis at public.kitware.com
Sat Feb 13 18:11:39 EST 2016
The following issue has been SUBMITTED.
======================================================================
https://cmake.org/Bug/view.php?id=15973
======================================================================
Reported By: Paweł Stankowski
Assigned To:
======================================================================
Project: CMake
Issue ID: 15973
Category: CMake
Reproducibility: always
Severity: trivial
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-02-13 18:11 EST
Last Modified: 2016-02-13 18:11 EST
======================================================================
Summary: ASM-ATT: cannot set assembler using environment
variable
Description:
Environment variable cannot be used for ATT dialect, because it contains dash in
this variable's name ("ASM-ATT"). Bash and other shells won't parse assignment
to variable containing such sign. There is an ugly workaround, though:
env 'ASM-ATT=~/bin/i386-linux-as' cmake ../src
CMakeDetermineASMCompiler.cmake checks for existance of environment variable
ASM${ASM_DIALECT} at the early phase of lookup.
This works nicely for NASM and MASM assemblers, because they use underscore
instead of dash (ASM_NASM, ASM_MASM).
Steps to Reproduce:
1. Install two gas assemblers: in system and other directory.
2. In a build directory try to point cmake to the non-default assembler:
env 'ASM-ATT=<PATH-TO-OTHER-ASSEMBLER>' cmake ../src
3. Check which assembler was chosen:
grep ASM-ATT_COMPILER:FILEPATH CMakeCache.txt
Additional Information:
I propose to solve that by replacing '-' by '_' when searching for environment
variable in CMakeDetermineASMCompiler.cmake. It is possible to preserve backward
compatibility by searching for both old and new variable. However, because it
was so difficult to set ASM-ATT env variable, it is probably not needed.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-02-13 18:11 Paweł StankowskiNew Issue
======================================================================
More information about the cmake-developers
mailing list