I tried changing from ASM to ASM-ATT and that fails like this:<br><br>/usr/bin/as  -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 /user/grc/msvdx-cvsfiles/sim/msvdx-cmake-2.8.5/systemC/src/sysc/qt/md/i386.s<br>
/usr/bin/as: unrecognized option `-NOMINMAX&#39;<br><br>I really don&#39;t think the -I and -D options should be passed through for assembler files.  They only make sense for C/C++ files.  There should be a separate variable like CMAKE_ASM_FLAGS that is used instead of CMAKE_C_FLAGS or CMAKE_CXX_FLAGS.  And maybe there needs to be a change to the add_definitions() command to allow an optional LANG argument ?  Do assembers even support preprocessor definitions ?<br>
<br>I was able to get it to work for both 2.8.4 and 2.8.5 with the following code:<br><br>if(UNIX)<br>    list(APPEND sources &quot;src/sysc/qt/qt.c&quot;)<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>    enable_language(ASM-ATT)<br>
    <br>
    set(CMAKE_ASM-ATT_COMPILE_OBJECT &quot;&lt;CMAKE_ASM-ATT_COMPILER&gt; ${ASM_SYS_FLAGS} -o &lt;OBJECT&gt; &lt;SOURCE&gt;&quot;)<br>endif()<br><br>I&#39;m not sure if this is the recommended way to do this though.  I thought the documentation said to override CMAKE_ASM-ATT_COMPILE_OBJECT before the enable_language() command.  If I do that then I get the -I and -D flags back and my ASM_SYS_FLAGS variable is ignored.  Is there a cleaner way to do this or is my current solution okay ?<br>
<br><br><div class="gmail_quote">2011/8/2 Alexander Neundorf <span dir="ltr">&lt;<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<div class="im"><br>
On Tuesday 02 August 2011, Glenn Coombs wrote:<br>
&gt; Previously with cmake 2.8.4 we were using these lines to compile an<br>
<br>
</div>with 2.8.5 there was a major rework of the assembler support (and now it<br>
finally does not say &quot;Assembler support is experimental&quot; anymore).<br>
Sorry that this causes inconvenience for you.<br>
<br>
If you enable &quot;ASM&quot;, you get support for assembler via your C/C++ compiler.<br>
That&#39;s why you get gcc now instead of as.<br>
If the C/C++ compiler does not support processing assembler files, this<br>
language can&#39;t be enabled.<br>
<br>
If you need a &quot;real&quot; assembler, you have to enable the respective assembler<br>
&quot;dialect&quot;. E.g. to get as/gas, you need to enable &quot;ASM-ATT&quot;.<br>
This should work with both versions.<br>
<br>
Let me know if this doesn&#39;t work for you.<br>
<br>
Alex<br>
</blockquote></div><br>