[CMake] add_custom_command using CMAKE_CXX_FLAGS

Óscar Fuentes ofv at wanadoo.es
Mon Aug 24 12:56:33 EDT 2009


Tyler Roscoe <tyler at cryptio.net> writes:

> On Sun, Aug 23, 2009 at 09:03:22PM -0400, John Smith wrote:
>> I am using the following test case in an attempt to add a custom  
>> command to build an assembly file. The assembly file should be  
>> compiled with the C++ compiler driver (which in turn should invoke the  
>> assembler after pre-processing), and I am building up a  
>> CMAKE_CXX_FLAGS variable from separate pieces:
>
> I think you can just hand your .S files to add_library(). Did you try
> searching the ML archives or google for how to handle assembler files
> with CMake?

Assembler support is broken, at least for masm/64 as some user reported
here some days ago.

  enable_language(ASM_MASM)
  set(sources ${sources} X86CompilationCallback_Win64.asm)

My users say that with the previous code the build pretends to compile
the assembler file as if it were a C file.

If the other assemblers are broken too, I guess this is the reason
people are trying workarounds.

[snip]

-- 
Óscar



More information about the CMake mailing list