<div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>&gt; Ideally, I would like to pass it to<br>


&gt; add_library with all the other source files (in the same way I can pass it<br>
&gt; to C++ which automatically forwards it to the assembler). This is not<br>
&gt; working,<br>
<br>
</div>Stop. The next step is no logical one. If it doesn&#39;t work for one target, why<br>
Should it for another?</blockquote><div><br>
I think I was not clear enough here: it is not working when I combine
ASM source files and CXX source files and as I found out by now, this
is probably not supported anways. (Mixing ASM and C++ source files
would be the ideal scenario because I can do it with g++ directly, too)<br>
</div><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; cmake_minimum_required(VERSION 2.6)<br>
<div>
&gt; project(TEST)<br>
&gt; enable_language(ASM)<br>
&gt; add_library(asmtest MyAsm.S)<br>
<br>
</div>That looks fine. And just adding the assembler file works here. Are you<br>
cross-compiling? If yes, did you define CMAKE_ASM_COMPILER?</blockquote><div><br>No, I&#39;m compiling on the target platform itself.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What is the compilation output? (make VERBOSE=1)<br>
Does that file actually appear there?</blockquote><div><br>Thanks for the hint, your guess was right, the file does NOT appear there. My conclusion is that add_library does not look for the right extension, could that be it? I tried to do:<br>
<br>set(${CMAKE_ASM_SOURCE_FILE_EXTENSIONS} &quot;s;S&quot;)<br><br>but this does not help. To debug this, I do the following on the next line<br><br>message(&quot;${CMAKE_ASM_SOURCE_FILE_EXTENSIONS}&quot;)<br><br>Strangly, this does not print anything, just an empty line. Why is that? Simliarly, I cannot change CMAKE_ASM_COMPILER. When I echo it, it returns /usr/bin/as correctly but for a little test, I set it to /usr/bin/c++. However, when I echo it after the resetting it, the value is still the original one: /usr/bin/as. So it seems that I somehow cannot define the variables for ASM mode. Could that be the root of the problem?<br>
<br>Any ideas for a workaround? At this point, I&#39;m desperate enough to accept any hack...<br><br>Thanks,<br><br>Stefan<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
HS<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org" target="_blank">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>