[CMake] [MODULES][UseSWIG] Dependencies automagically computed!
Tristan Carel
tristan.carel at gmail.com
Fri Dec 8 20:25:17 EST 2006
Hi Swig lovers,
Axel had the great idea to use the -swiglib option in order to improve
the module's efficiency to properly fill the prerequesites variables.
I guess it is the perfect example of using a tool to perform its
`configure' part.
On the other hand, it's hard to maintain dependencies of the wrapper
generated by swig because the developper has to manually update the
CMakeLists.txt each time a change relative to the file inclusions in
the main swig file is performed. But Swig provides a couple of
options: -M, -MM, -MF, ...
which have the same behavior than gcc's: compute the dependencies for
us, lazy developpers!
So I submitted a new macro in the `UseSWIG.cmake' few days ago:
http://www.cmake.org/Bug/bug.php?op=show&bugid=4147&pos=7
# SWIG_GET_WRAPPER_DEPENDENCIES(swigFile genWrapper language DEST_VARIABLE)
# - Put dependencies of the wrapper genWrapper generated by swig from
# swigFile in DEST_VARIABLE
A full description (including behavior, use cases) is available on the
bug tracker.
So as Axel wrote:
"Any comments or volunteers to try?"
Cheers
--
Tristan Carel
Music with dinner is an insult both to the cook and the violinist.
More information about the CMake
mailing list