Easier development using Visual Studio with introduction of target folders

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Easier development using Visual Studio with introduction of target folders

Jean-Christophe Fillion-Robin
Hi Slicers,

Following commit r23961 [1], within IDE that support it, Slicer targets will be organized into folders.

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=23961

This should allow you to more easily find out which targets and source files are associated with what.

The enclosed screenshot will illustrate the idea.

If for some reason, you prefer a flat organization of the targets, you can configure Slicer with option Slicer_USE_FOLDERS set to OFF.


// ------------------------
ENH: Improve build targets organization in IDE that support folders

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:
* SlicerExecutionModel
* OtsuThresholdImageFilter


 (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 <[hidden email]>
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 <[hidden email]>
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:
    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
    Note that:
     - FOLDER support has been introduced in CMake >= 2.8.3
     - 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 <[hidden email]>
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 <[hidden email]>
Date:   Wed Feb 4 18:08:28 2015 -0500

    Associate folder with test targets.
// -------------

// ------------------------

+1 919 869 8849

slicer-devel mailing list
[hidden email]
To unsubscribe: send email to [hidden email] with unsubscribe as the subject

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

r23961-Slicer-support-target-folders.png (398K) Download Attachment