dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #19726
CMake and SWIG header files.
Hello!
SWIG is not run when a header file is changed. This might be pleasant for
someone, but I think we should rebuild the SWIG interface.
I tried adding this
# and the DOLFIN header files
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c 'import sys; sys.stdout.write("
".join([r"${DOLFIN_SOURCE_DIR}/"+l.split("\"")[1] for l in
open("kernel_modules.i").readlines() if "%include" in l]))'
OUTPUT_VARIABLE SWIG_KERNEL_MODULES
)
in the CMakeList file, but it cannot be executed as I get the error
File "<string>", line 1
'import
The command executes fine at the command line though. So I figure it has to be
something CMake does. I have to use a double quote (") in the command and
therefore I cannot use it as delimiters for the command.
Any other good suggestions of how to get these files within cmake?
Johan
Follow ups