On Sun, 2009-07-12 at 00:09 +0200, Eric Noulard wrote: > 2009/7/11 Marcel Loose <[email protected]>: > > Hi Bill, > > > > The problem is not in the invocation of gcc. That works fine. The > > problem is that I lose the preprocessor definitions that were added with > > add_definitions() when compiling assembly files. These assembly files > > must be preprocessed by gcc. I have the feeling that CMake purposely > > drops these. So the question is how I can persuade CMake to keep the -D > > options on the command line. > > I don't know if you can persuade CMake to keep those for "compiling" > ASM instead of C but you may be you get the > currently added definitions using properties: > (on directory, target or source > see cmake --help-properties) > > e.g.: > > get_directory_property(ASM_DEF DEFINITION) > > then use the value of ASM_DEF in your *ASM*.cmake. > > Take my opinion as "pure guess" because I does not know > much on how CMake*Compiler.cmake works so I don't know > if you may "share" some variables values between > the standard C and your custom ASM. > > > > Note that I have defined an assembler for BG/P that uses gcc as > > frontend, using the *ASM*.cmake macros mentioned in my previous mail. > > Hi Eric,
Thanks, I'll try that tomorrow. Another option that occurred to me today is that, since I'm using gcc to preprocess and compile the assembly sources, I might add .S as source file extension to CMAKE_C_SOURCE_FILE_EXTENSIONS. Any idea if that might work? 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
