[CMake] file property SWIG_FLAGS results in NOTFOUND
Brad King
brad.king at kitware.com
Fri Apr 1 10:51:47 EST 2005
Axel Wachtler wrote:
> Hallo all,
>
> I use cmake in a project under mingw and under linux, so the
> Makefile Generator is "Unix Makefiles".
>
> Currently with Swig, two issues coming up (may be coming from
> layer 8, e.g. from the guy sitting in front of the terminal).
>
>
> (1)
> I just tried to use the cmake example at swig.org.
>
> When I run the example I get in the Makefile
>
> /usr/bin/swig -python NOTFOUND -c -I/usr/include/python2.3 \
> -I/mnt/net/axel/1/scratch/cmake_vortrag/src/Cmswig/build
>
> It seems that NOTFOUND is coming from
> SET_SOURCE_FILES_PROPERTIES(../Source/example.i
> PROPERTIES SWIG_FLAGS ... )
>
> I did a workaround while copying UseSWIG.cmake to a local
> dir and fix it by commenting out the use of the SWIG_FLAGS
> file property.
>
> Also I would suggest to remove the hardcoded "-c"
> from UseSWIG.cmake, because it means raw wrapper code,
> so that a C file can not get linked properly.
> This could be set by the user, if needed.
Please report this as a bug here:
http://www.cmake.org/Bug
> (2)
> The second question is, I want to add a custom file generator
> before swig is called (a Python script, which generates
> another swig module), how I can do this? I could not find a
> valid target name, to use in ADD_CUSTOM_(TARGET|COMMAND).
You don't actually need a target name. That is the old custom command
format. Just specify as an OUTPUT a file that is used as an input by
the swig macro. The generation rule should automatically be put in the
right place.
-Brad
More information about the CMake
mailing list