[Insight-developers] FLTK code wrapping added to CMake --> please update CMake

Luis Ibanez ibanez@choroid.cs.unc.edu
Mon, 3 Dec 2001 06:05:04 -0500 (EST)


Hi,

The command cmFLTKWrapUI  was added to CMake. It allows to
define a list of .fl files that will be processed by Fluid
in order to generate .cxx and .h files.

We'll need then to update CMake in the machines that are
submitting to the dashboard.

-------

We were previously checking in three files:

    itkFoo.fl
    itkFoo.cxx
    itkFoo.h

which were redundant and produced some inconsistencies
when different version of FLTK were used.



Now, only the file itkFoo.fl has to be checked in.
The two files:  itkFoo.h and itkFoo.cxx will be generated
in the OUTPUT directory. CMake will recognize them there
and will add them to the list of dependencies.

That has been tested so far on Linux, so it will probably
require a second look in other platforms.

The command is used in the following way:

  1) define a list of .fl (sources for fluid) files
  2) define a list for adding the files that fluid will
     generate
  3) set the command FLTK_WRAP_UI with the two lists.


Example: (in Insight/Examples/Curve2DExtractor)

   # this is a list that contains non-fluid
   # generated files. (normal files)
   ( SOURCE_FILES(Curves2DExtractor_SRCS
     ceExtractorConsole
     ceExtractorConsoleBase
   )

   # this is the list of .fl files that fluid
   # will process in order to generate .cxx and .h
   SOURCE_FILES(FLTK_GUI_Files_SRCS
     ceExtractorConsoleGUI.fl
   )

   # this is the command that will trigger the
   # execution of fluid and will take care of
   # the dependencies.
   FLTK_WRAP_UI(FLTK_GUI_Files_SRCS Curves2DExtractor_SRCS)



---------

For this to work we have modified a line in the top level
CMakeLists.txt file where a regular expression is defined
to restrict the #include files that are considered for the
dependency rules.

the line was:

INCLUDE_REGULAR_EXPRESSION("^(itk|vtk|vnl|vcl|f2c).*$")

and now is:

INCLUDE_REGULAR_EXPRESSION("^(itk|vtk|vnl|vcl|f2c|ce).*$")

so the "ce" initials were added. This is completly arbitrary
because the files in the example happen to be named :

     ceExtractorConsole.h
     ceExtractorConsoleGUI.h  ... etc


Is there a better way to enlarge or replace the regular
expression for a subproject ?

Or maybe we can agree in a prefix to use for all the files
generated by FLTK ? ....


Thanks

Luis