On 16. Sep, 2010, at 14:42 , skippy VonDrake wrote:

> Greetings,
> I have a project most of which is in C but it includes a couple of assembly
> files (.S).
> CMake builds it just fine until I add a preprocessor option meant for gcc -
> and that the assembler
> can't digest.
> Recently I set the COMPILE_FLAGS to include "-H".  The compiler did as the
> flag specified.
> It listed all the headers in the dependency chain.
> But then I got the error:
> ... /usr/bin/as -o myAssemblyModule.S.o  myAssemblyModule.S
> as: unrecognized option `-H`
> 
> I know the assembly capabilities of cmake are still "experimental" but is
> there a way
> to keep an option from passing to the assembler?
> 
> I'm using cmake 2.8 on FreeBSD 7.2 and using the KDevelop3 generator.
> 
> Skippy

You could try to do something like this:

set(SRCS_C src1.c src2.c)
set(SRCS_ASM src3.S src4.S)
add_executable(foo ${SRCS_C} ${SRCS_ASM})
set_source_files_properties(${SRCS_C} PROPERTIES
  COMPILE_FLAGS -H)

Michael

--
There is always a well-known solution to every human problem -- neat, 
plausible, and wrong.
H. L. Mencken

Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to