[cmake-developers] Empty C_FLAGS with Generic target

Ninfo Mane ninfomanie at gmail.com
Thu Sep 29 06:25:27 EDT 2011


Hi everybody,

I'm trying to write a toolchain for a specific C compiler. Within the .cmake
file, I specify the CMAKE_SYSTEM_NAME as 'Generic' and define the C compiler
(something like h8300-elf-gcc).
I define other compilers (ar and ld) and set some CMAKE_C_FLAGS.

But when I want to generate the project, the CMAKE_C_FLAGS seems to be
empty. I have to run a second time the cmake command line in order to have
flags in generated makefile.

I also try to only define CMAKE_SYSTEM_NAME and CMAKE_C_COMPILER within the
toolchain and set CMAKE_C_FLAGS in a file placed in cmake's Platform install
directory. I guess it doesn't load this file as I put a message() which are
not displayed.

Am I doing something wrong ?
Thank you for help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20110929/843fddb3/attachment.html>


More information about the cmake-developers mailing list