[CMake] SET_SOURCE_FILES_PROPERTIES

James Bigler bigler at cs.utah.edu
Fri Mar 10 11:52:56 EST 2006


Brad King wrote:
> James Bigler wrote:
>> I'm using CMake 2.2.3, swig 1.3.28 on Suse Linux 9.3.
>>
>> I want to set a couple of different options for a swig interface file 
>> I'm compiling:
>>
>> # This is all on a single line if my email program munges it.
>> SET_SOURCE_FILES_PROPERTIES(manta.i PROPERTIES SWIG_FLAGS "-Wall 
>> -DSCI_NOPERSISTENT")
>>
>>
>> Well, when it runs the command it adds a "\" after "-Wall":
>>
>> /usr/local/bin/swig -python -Wall\ -DSCI_NOPERSISTENT ...
>>
>> Which causes swig to barf.
>>
>> Note that this works:
>>
>> /usr/local/bin/swig -python -Wall -DSCI_NOPERSISTENT ...
>>
>> How do I specify multiple arguments to swig from CMake (one is fine)?
> 
> I think the swig macros treat the SWIG_FLAGS property as a list and not 
> a string, so you should specify a semicolon separated set of flags:
> 
> SET_SOURCE_FILES_PROPERTIES(manta.i PROPERTIES
>   SWIG_FLAGS "-Wall;-DSCI_NOPERSISTENT")

Thanks.  This worked.

James


More information about the CMake mailing list