[Insight-developers] Adding missing PROJECT declarations to ITK

Brad King brad.king at kitware.com
Wed Jun 10 10:12:38 EDT 2009


Hans Johnson wrote:
> In many IDE's the heirarchy of CMake PROJECT() declarations are 
> reflected in the organization of files in the IDE.  I've noticed that 
> the use of the PROJECT declarations is not uniformly set, and I would 
> like to propose adding PROJECT declarations to many of the 
> CMakeLists.txt files that are currently missing.

I wouldn't say they are missing, just unnecessary.  In fact I think many
of the Examples projects should be REMOVED.  The main reason to have
a project() command anywhere except the top is if the directory can
be built standalone as its own project (like ITK/Testing can build
against an ITK install tree).  This is not true of most uses.

Also, CMake generates a .sln file for every project() command.  This will
make generation slower, but that is not a significant portion of ITK's
build time.

> I would also like to change one of the project names that is currently 
> duplicated.  Currently WrapITK is used for both 
> Insight/Wrapping/CSwig/CMakeLists.txt, and 
> Insight/Wrapping/WrapITK/CMakeLists.txt.  I propose changing the project 
> declarations for Insight/Wrapping/CSwig/CMakeLists.txt to CSwigITK

I doubt anyone ever really wants to turn both of these on at once, but
it doesn't hurt to fix the CSwigITK project name.  Please check that the
references to WrapITK_* variables in that dir are converted, if any exist.

> *PROJECT(AlgorithmsITK)           Insight/Code/Algorithms/CMakeLists.txt
> *PROJECT(BasicFiltersITK)         Insight/Code/BasicFilters/CMakeLists.txt
> *PROJECT(CodeITK)                 Insight/Code/CMakeLists.txt
> *PROJECT(CommonITK)               Insight/Code/Common/CMakeLists.txt
> *PROJECT(IOITK)                   Insight/Code/IO/CMakeLists.txt
> *PROJECT(NumericsITK)             Insight/Code/Numerics/CMakeLists.txt
> *PROJECT(FEMITK)                  Insight/Code/Numerics/FEM/CMakeLists.txt
> *PROJECT(NeuralNetworksITK) 
>       Insight/Code/Numerics/NeuralNetworks/CMakeLists.txt
> *PROJECT(StatisticsITK) 
>           Insight/Code/Numerics/Statistics/CMakeLists.txt
> *PROJECT(PatentedITK)             Insight/Code/Patented/CMakeLists.txt
> *PROJECT(ReviewITK)               Insight/Code/Review/CMakeLists.txt
> *PROJECT(Statistics2ITK) 
>          Insight/Code/Review/Statistics/CMakeLists.txt
> *PROJECT(SpatialObjectITK)        Insight/Code/SpatialObject/CMakeLists.txt
> *PROJECT(ITKExamples)             Insight/Examples/CMakeLists.txt
> *PROJECT(DataRepresentationExamples) 
>  Insight/Examples/DataRepresentation/CMakeLists.txt

These directories cannot build alone, and

   ${AlgorithmsITK_SOURCE_DIR}

is not preferred over

   ${ITK_SOURCE_DIR}/Code/Algorithms

IMO.

> *PROJECT(ContainersExamples) 
>      Insight/Examples/DataRepresentation/Containers/CMakeLists.txt
> PROJECT(ImageExamples) 
>            Insight/Examples/DataRepresentation/Image/CMakeLists.txt
> PROJECT(MeshExamples) 
>             Insight/Examples/DataRepresentation/Mesh/CMakeLists.txt
> PROJECT(PathExamples) 
>             Insight/Examples/DataRepresentation/Path/CMakeLists.txt
> PROJECT(FilteringExamples)        Insight/Examples/Filtering/CMakeLists.txt
> *PROJECT(GUIExamples)             Insight/Examples/GUI/CMakeLists.txt
> *PROJECT(InfrastructureExamples) 
>  Insight/Examples/Infrastructure/CMakeLists.txt
> PROJECT(HelloWorld) 
>               Insight/Examples/Installation/CMakeLists.txt
> PROJECT(IOExamples)               Insight/Examples/IO/CMakeLists.txt
> PROJECT(IteratorExamples)         Insight/Examples/Iterators/CMakeLists.txt
> PROJECT(NumericsExamples)         Insight/Examples/Numerics/CMakeLists.txt
> PROJECT(PatentedExamples)         Insight/Examples/Patented/CMakeLists.txt
> PROJECT(ImageRegistration) 
>        Insight/Examples/Registration/CMakeLists.txt
> PROJECT(ImageSegmentation) 
>        Insight/Examples/Segmentation/CMakeLists.txt
> PROJECT(SpatialObjectsExamples) 
>   Insight/Examples/SpatialObjects/CMakeLists.txt
> PROJECT(StatisticsExamples)       Insight/Examples/Statistics/CMakeLists.txt
> *PROJECT(WrappingExamples)        Insight/Examples/Wrapping/CMakeLists.txt

Most of these should be removed unless they support building standalone.

> *Testing stays the same*
> *Utilities stays the same*

Agreed, these can stay.

> *PROJECT(WrapITK)->(CSwigITK)     Insight/Wrapping/CSwig/CMakeLists.txt

Agreed.

> PROJECT(ItkVtkGlue) 
>               Insight/Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/Wrapping/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/Wrapping/Python/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/Wrapping/Python/itkExtras/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/Wrapping/Python/Tests/CMakeLists.txt
> PROJECT(MultiThreaderControl) 
>     Insight/Wrapping/WrapITK/ExternalProjects/MultiThreaderControl/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/ExternalProjects/MultiThreaderControl/Python/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/ExternalProjects/MultiThreaderControl/Python/Tests/CMakeLists.txt
> PROJECT(PyBuffer) 
>                 Insight/Wrapping/WrapITK/ExternalProjects/PyBuffer/CMakeLists.txt

These are standalone projects, so keep.

> *PROJECT(WrapJava) 
>                Insight/Wrapping/WrapITK/Java/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/Java/CWD/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/Java/Tests/CMakeLists.txt
> *PROJECT(WrapModules) 
>             Insight/Wrapping/WrapITK/Modules/Base/CMakeLists.txt
> *WrapITK/Modules stays the same*
> *PROJECT(WrapPerl) 
>                Insight/Wrapping/WrapITK/Perl/CMakeLists.txt
> *PROJECT(WrapPython) 
>              Insight/Wrapping/WrapITK/Python/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/Python/itkExtras/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/Python/PyUtils/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/Python/Tests/CMakeLists.txt
>                                   Insight/Wrapping/WrapITK/SwigRuntime/CMakeLists.txt
> *PROJECT(WrapTCL) 
>                 Insight/Wrapping/WrapITK/Tcl/CMakeLists.txt

Unnecessary.

-Brad


More information about the Insight-developers mailing list