Skip to content
  • jcfr's avatar
    ENH: Improve build targets organization in IDE that support folders · 94f10559
    jcfr authored
    This commit set the FOLDER property on all targets to group them
    into meaningful "units". This will make development easier ensuring
    it is possible to quickly re-build and open the source files associated
    with the targets of either a given module, the core libraries or even
    the Slicer application.
    
    Currently the grouping is:
    * App-SlicerApp
    * CMakePredefinedTargets
    * Core-Base
    * Core-Libs
     * FreeSurfer
     * ITKFactoryRegistration
     * [...]
    * Module-<NameOfModule>
    * [...]
    
    If for some reason, the folder organization needs to be disabled. Slicer
    could be configured with Slicer_USE_FOLDERS set to OFF.
    
    Projects updated in this commit:
    * CTK
    * SlicerExecutionModel
    * OtsuThresholdImageFilter
    
    Notes:
    
     (1) some of the targets (EMSegment, BRAINSTools, MultiVolume, ...)
    are still associated to the root and not yet categorized.
    
     (2) ideally few more  macros/functions should be introduced: one to
    easily configure subject hierarchy plugin, and one to easily configure
    tests associated with a CLI.
    
    
    CTK changes:
    
    // -------------
    commit commontk/CTK@ac1370e
    Author: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
    Date:   Wed Feb 4 14:47:09 2015 -0500
    
        Add FOLDER parameter to ctkMacroBuildQtPlugin
    
        If specified, the target(s) associated with designer, icon engine and
        style plugins will be added into the specified folder when the project is
        configured for an IDE supporting it.
    
        For more details, see http://www.cmake.org/cmake/help/v2.8.9/cmake.html#prop_tgt:FOLDER
    // -------------
    
    
    SlicerExecutionModel changes:
    
    // -------------
    commit Slicer/SlicerExecutionModel@0b780eb
    Author: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
    Date:   Wed Feb 4 18:06:25 2015 -0500
    
        ENH: SEMMacroBuildCLI - Add possibility to associate FOLDER with CLI targets
    
        In project building a lot of modules (i.e Slicer), whenever possible, it
        is better to keep the huge list of targets organized. To help with this,
        CMake allows to set a FOLDER target property.
    
        See http://www.cmake.org/cmake/help/v2.8.3/cmake.html#prop_tgt:FOLDER
    
        This commit extends the SEMMacroBuildCLI API to accept an optional FOLDER
        parameter. If not set, the folder name will default to:
    
          <SlicerExecutionModel_DEFAULT_CLI_TARGETS_FOLDER_PREFIX><MODULE_NAME>
    
        By default the prefix is set to an empty string and the folder will be
        named after the module name.
    
        There are two ways to specify a default prefix value:
    
         (1) Set the variable SlicerExecutionModel_DEFAULT_CLI_TARGETS_FOLDER_PREFIX
        in the current scope before calling 'SEMMacroBuildCLI'
    
         (2) Configure the SlicerExecutionModel project with the option
        SlicerExecutionModel_DEFAULT_CLI_TARGETS_FOLDER_PREFIX
    
        Note that:
         - FOLDER support has been introduced in CMake >= 2.8.3
        and
         - it can optionally be enabled in a project by setting the global
        property named USE_FOLDERS.
    
        See http://www.cmake.org/cmake/help/v2.8.3/cmake.html#prop_global:USE_FOLDERS
    
        Finally, to associate CLI test expected to be in the same "FOLDER",
        a variable named <MODULE_NAME>_TARGETS_FOLDER is conveniently set in the
        current scope each time the macro SEMMacroBuildCLI is called.
    
    commit Slicer/SlicerExecutionModel@e84d231
    Author: Matt McCormick <matt.mccormick@kitware.com>
    Date:   Thu Aug 7 11:09:39 2014 -0400
    
        BUG: Fix ModuleDescriptionParser test data dir.
    
        Fixes Parser1Test{1,2}.
    
        Simplify by consolidation of variables.
    // -------------
    
    
    OtsuThresholdImageFilter changes:
    
    // -------------
    commit :Slicer/Slicer-OtsuThresholdImageFilter@5efe412
    Author: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
    Date:   Wed Feb 4 18:08:28 2015 -0500
    
        Associate folder with test targets.
        [...]
    // -------------
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@23961 3bd1e089-480b-0410-8dfb-8563597acbee
    94f10559