[Cmake] Determining host compiler/OS from CMake

Andy Cedilnik Andy.Cedilnik at kitware.com
Mon Mar 4 14:46:19 EST 2002


Ok, how about:
SOURCE_FILES_FLAGS("gcc" -Dfoobar file1 file2)
which means add flag -Dfoobar to gcc compiler. If compiler is aCC don't do
anything.

                         Andy

At 02:31 PM 3/4/2002 -0500, Bill Hoffman wrote:
>This is more than adding a -D, it can be used to add any arbitrary flag
>to the compiler on a per file basis.
>
>-Bill
>
>
>At 02:25 PM 3/4/2002 -0500, Andy Cedilnik wrote:
> >At 02:16 PM 3/4/2002 -0500, Bill Hoffman wrote:
> >>I have just added per file flags with the command:
> >>
> >>SOURCE_FILES_FLAGS("-Dfoobar" file1 file2 ...)





More information about the CMake mailing list