[CMake] help with learning add_library
luxInteg
lux-integ at btconnect.com
Wed Nov 10 10:17:09 EST 2010
On Monday 08 November 2010 18:10:01 Eric Noulard wrote:
> > BUT
> > suppose I decide to set file1.c and file2.c as some variable "FILES"
> > and I want to use a preprocessor say DLONG
> > could I do the following?
> >
> > set(FILES file1.c file2.c )
> > SET_SOURCE_FILES_PROPERTIES(${FILES} PROPERTIES COMPILE_DEFINITIONS
> > "-DLONG")
>
> Off course you can
BUT if I have two files file1.c and file2.c to be compiled with different
preprocesser arguments could I do this:-
set(FILES file1.c file2.c)
SET_SOURCE_FILES_PROPERTIES( file1.c PROPERTIES COMPILE_DEFINITIONS "-DLONG")
SET_SOURCE_FILES_PROPERTIES( file2.c PROPERTIES COMPILE_DEFINITIONS "-DINT")
More information about the CMake
mailing list