Previously with cmake 2.8.4 we were using these lines to compile an assembly language file in our project:<br><br>if(UNIX)<br>    enable_language(ASM)<br><br># see if we are building 32-bit or 64-bit executables<br>    file(WRITE ${CMAKE_BINARY_DIR}/check_32or64bit.cpp &quot;int main(int argc, char *argv[]) { return 8 * sizeof(char *); }\n&quot;)<br>
<br>    try_run(<br>        run_result<br>        compile_result<br>        ${CMAKE_BINARY_DIR}            ${CMAKE_BINARY_DIR}/check_32or64bit.cpp<br>        )<br>    <br>    if (${run_result} EQUAL 32)<br>        list(APPEND sources &quot;src/sysc/qt/md/i386.s&quot;)<br>
        if(APPLE)<br>            set(ASM_SYS_FLAGS &quot;-arch i386&quot;)<br>        else()<br>            set(ASM_SYS_FLAGS &quot;-32&quot;)<br>        endif()<br>    else()<br>        list(APPEND sources &quot;src/sysc/qt/md/iX86_64.s&quot;)<br>
        if(APPLE)<br>            set(ASM_SYS_FLAGS &quot;-arch x86_64&quot;)<br>        else()<br>            set(ASM_SYS_FLAGS &quot;-64&quot;)<br>        endif()<br>    endif()<br><br>    set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT &quot;&lt;CMAKE_ASM${ASM_DIALECT}_COMPILER&gt; ${ASM_SYS_FLAGS} -o &lt;OBJECT&gt; &lt;SOURCE&gt;&quot;)<br>
endif()<br><br>And this resulted in the appropriate 32-bit or 64-bit assembler file being compiled like so:<br><br>    /usr/bin/as  -32 -o &lt;path snipped&gt;/i386.s.o      &lt;path-snipped&gt;/i386.s<br>
    /usr/bin/as  -64 -o &lt;path snipped&gt;/iX86_64.s.o &lt;path-snipped&gt;/iX86_64.s<br><br>Now with cmake 2.8.5 it fails when compiling that assembler file as it uses /usr/bin/gcc rather than /usr/bin/as and gcc wants -m32 and -c instead of -32.  When I tried commenting out the line that overrides the default setting of CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT it fails differently:<br>
<br>/usr/bin/gcc  -DEXTERNAL_BUS_WIDTH=128 -DLINUX -DHIDEBUG -O3 -DNDEBUG -I/user/grc/msvdx-cvsfiles/sim/msvdx-cmake-2.8.5/systemC/src -I/user/grc/msvdx-cvsfiles/sim/msvdx-cmake-2.8.5/systemC/src/sysc/kernel    -DNOMINMAX -DUSE_SIM_NAMESPACE -o CMakeFiles/systemc.dir/src/sysc/qt/md/i386.s.o -c /user/grc/msvdx-cvsfiles/sim/msvdx-cmake-2.8.5/systemC/src/sysc/qt/md/i386.s<br>
<br>i386.s:69: Error: suffix or operands invalid for `push&#39;<br>
<br>This line works if I add the -m32 option using set(CMAKE_ASM_FLAGS &quot;-m32&quot;) but should all the preprocessor defines (-DXXX) and include directory arguments (-IXXX) be present ?  I was thinking they were only for C/C++ files, no ?<br>
<br>And what is the recommended way to compile an assembly language file that will work on both 2.8.4 and 2.8.5 ?<br><br>--<br>Glenn<br><br>