[Insight-developers] ITKModular: Missing makefiles

Brad King brad.king at kitware.com
Tue Apr 26 11:32:53 EDT 2011


On 04/26/2011 11:15 AM, Bill Lorensen wrote:
> No makefile found for these:
>   cd ITK-bin/Modules;  make
>   cd ITK-bin/Modules/Core; make

These directories have no corresponding input CMakeLists.txt file so
there is no makefile.  They appear because of the non-flat directory
structure used to contain modules.  The top directory adds the subdir
but skips over intermediate directories.

>  For this one, a makefile is found, but the make runs even if there are
> changes to include files. This is very misleading, since you can change
> a .h or .txx file, run make and nothing builds.
> 
> cd ITK-bin/Modules/Filtering/DistanceMap; make
> but,
> cd ITK-bin/Modules/Filtering/DistanceMap/test; make
> does recompile the affected tests.

This is because the test directory is added by a separate add_subdirectory
call from the top level.  It is necessary to break the circular dependency
that would exist among the IO module tests and TestKernel if the test
directory were a true subdirectory of the main module from CMake's point
of view.

> Would it be possible to add makefiles to the directories that do not
> have them now?

Not without sacrificing the module globbing, sorting, and grouping magic
that is there now.  Instead one can use different way of building that
does not involve "cd".  One can build everything in a module by running

  make $module-all

where $module is the name of the module you want.  This is how it works
from the IDE build systems too.

-Brad


More information about the Insight-developers mailing list