CMake Swig: how to add depencencies on included .i files

I'm using cmake to create a binding based on swig.

I add my swig library like this.

SWIG_ADD_LIBRARY(my_swig_DLL
                                LANGUAGE
                                        Java
                                SOURCES
                                        myfile.i
                                        )  

Everything works fine but CMake doesn't detect when a change is made on files included in my myfile.i. For example, the myfile. contains the line

%include "my_other_file.i"

The other file doesn't contain a module by itself but include support code I use in various projects.

How can I make CMake detect a change in my_other_file so it recompiles everything when the file has changed?

Quick note: adding my_other_file.i in the source list generates an error that the file does not contain a %module.

Thanks



from Recent Questions - Stack Overflow https://ift.tt/3yLi9Yt
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation