[CMake] How to pass -D options when compiling assembly files using gcc?

Bill Lorensen bill.lorensen at gmail.com
Fri Jul 10 11:29:03 EDT 2009


gcc has a command line option:

-Xassembler <arg>        Pass <arg> on to the assembler

Will this help?

Bill

On Fri, Jul 10, 2009 at 10:41 AM, Marcel Loose<loose at astron.nl> wrote:
> Hi all,
>
> I'm trying to build a library that has, amongst a number of C/C++
> sources, a number of assembly files as input. These are .S files which
> need to be cross-compiled for BG/P by gcc, not by as (or gas) directly.
>
> I have defined a number of preprocessor definitions (-D options) using
> add_definitions(). I noticed that these options are not passed to the
> command line when compiling the assembly files, only when compiling the
> C/C++ sources.
>
> Is there any way I can pass these -D options to the assembler as well?
>
> If needed, I can attach the files CMakeASM-BGPInformation.cmake,
> CMakeTestASM-BGPCompiler.cmake and CMakeDetermineASM-BGPCompiler.cmake
> that I wrote.
>
> Best regards,
> Marcel Loose.
>
>
>
> _______________________________________________
> 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
>


More information about the CMake mailing list