<div dir="ltr"><div><div>Hi Robert.<br><br></div>You might try leaving ASM out of project() and using enable_language() after your call to project() (potentially in conditional branches). It can only (reliably) be used from the toplevel CMakeList, but that sounds like it could be good enough for you.<br><br><a href="https://cmake.org/cmake/help/latest/command/enable_language.html">https://cmake.org/cmake/help/latest/command/enable_language.html</a><br><br></div>Petr<br><br><div class="gmail_extra"><br><div class="gmail_quote">On 3 October 2017 at 17:17, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey.lists@gmail.com" target="_blank">rcdailey.lists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I haven't; the bigger issue here is that the way we specify ASM<br>
changes depending on platform. But prior to the project() call, you<br>
can't really use CMake to its fullest since project() serves as<br>
practically an "initialize CMake" function. So there's a catch 22<br>
situation here.<br>
<br>
My expectation was that you specify the LANGUAGE, i.e. "ASM" and the<br>
platform cmake scripts within CMake's module directory would deduce<br>
"Ok I'm on Windows, so I know it's really MASM".<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Sep 19, 2017 at 3:35 PM, Robert Maynard<br>
<<a href="mailto:robert.maynard@kitware.com">robert.maynard@kitware.com</a>> wrote:<br>
> Have you tried setting the project call of project(libpng VERSION<br>
> 1.6.33 LANGUAGES ASM_MASM C)<br>
><br>
> On Tue, Sep 12, 2017 at 2:34 PM, Robert Dailey <<a href="mailto:rcdailey.lists@gmail.com">rcdailey.lists@gmail.com</a>> wrote:<br>
>> Also, I am using the "Visual Studio 15 2017" generator with no other<br>
>> options (generating through cmake-gui on Windows)<br>
>><br>
>> On Tue, Sep 12, 2017 at 1:33 PM, Robert Dailey <<a href="mailto:rcdailey.lists@gmail.com">rcdailey.lists@gmail.com</a>> wrote:<br>
>>> Using CMake 3.9, I do this:<br>
>>><br>
>>> cmake_minimum_required(VERSION 3.9)<br>
>>> project(libpng VERSION 1.6.33 LANGUAGES ASM C)<br>
>>><br>
>>> I get the following error:<br>
>>><br>
>>> -- The ASM compiler identification is unknown<br>
>>> -- Didn't find assembler<br>
>>> -- The C compiler identification is MSVC 19.11.25507.1<br>
>>> CMake Error at CMakeLists.txt:16 (project):<br>
>>> No CMAKE_ASM_COMPILER could be found.<br>
>>><br>
>>><br>
>>> Why doesn't this work?<br></div></div></blockquote></div></div></div>