Permalink
Commits on Apr 12, 2012
  1. ENH: Slicer 4.1.0

    jcfr committed Apr 12, 2012
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19886 3bd1e089-480b-0410-8dfb-8563597acbee
  2. COMP: Allow to build {Experimental, Nightly}Experimental(Upload) targ…

    jcfr committed Apr 12, 2012
    …et on visual studio by skipping Configuration.
    
    Doing so implies that project is in good order before selecting "build only" on the target.
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19885 3bd1e089-480b-0410-8dfb-8563597acbee
  3. COMP: Ensure the CMakeCache of extension contains variables expected …

    jcfr committed Apr 12, 2012
    …when using VisualStudio Generator
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19884 3bd1e089-480b-0410-8dfb-8563597acbee
  4. COMP: Ensure EXTENSION_{UPLOAD, TEST}_COMMAND works on Visual Studio …

    jcfr committed Apr 12, 2012
    …IDE by setting CMAKE_MAKE_PROGRAM in cache
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19883 3bd1e089-480b-0410-8dfb-8563597acbee
  5. COMP: Simplify extension template by moving 'SlicerEnableExtensionTes…

    jcfr committed Apr 12, 2012
    …ting' into UseSlicer
    
    Assuming MODULE_* variables are sued to specify metadata, creating an
    extension is as simple as adding:
    
    
    ...
    
    if(NOT Slicer_SOURCE_DIR)
       find_package(Slicer REQUIRED)
       include(${Slicer_USE_FILE})
    endif()
    
    ...
    
    if(NOT Slicer_SOURCE_DIR)
      include(${Slicer_EXTENSION_CPACK})
    endif()
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19882 3bd1e089-480b-0410-8dfb-8563597acbee
  6. BUG: Make MIDASAPILogin more robust in case of login failure.

    jcfr committed Apr 12, 2012
    This to avoid error similar to the one reported below:
    
    CMake Error at /path/to/Slicer4/Slicer/CMake/MIDASAPILogin.cmake:64 (string):
      string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
      command.
    Call Stack (most recent call first):
      /path/to/Slicer/Extensions/CMake/MIDASAPIUploadExtension.cmake:62 (midas_api_login)
      /path/to/Slicer/Slicer4/Slicer/Extensions/CMake/SlicerBlockBuildPackageAndUploadExtension.cmake:211 (midas_api_upload_extension)
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19881 3bd1e089-480b-0410-8dfb-8563597acbee
Commits on Apr 11, 2012
  1. ENH: Extend extension build system to support extension revision

    jcfr committed Apr 11, 2012
    Within the s4ext file, the option revision could be specified using
    the token "scmrevision".
    If not specified or specified to an empty string, the following default
    value will be used:
      git: origin/master
      svn: HEAD
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19880 3bd1e089-480b-0410-8dfb-8563597acbee
  2. COMP: Include Editor(Lib) only if Slicer_USE_PYTHONQT_WITH_TCL is ON

    jcfr committed Apr 11, 2012
    * This is xplained by the Editor.py, EditOptions.py, EditColor.py,
    LabelEffect.py and HelperBox.py all have dependency on 'tcl' module.
    
    * It could also probably make sens to exclude/include just part of the
    module with TCL is disabled/enabled. Such task will be left to the
    maintainer of the module.
    
    * Let's also note that having a test suite associated with the
    different EditorEffect would make sens.
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19879 3bd1e089-480b-0410-8dfb-8563597acbee
  3. COMP: DCMTK_DIR is now conveniently set in UseSlicer.cmake

    jcfr committed Apr 11, 2012
    Not that, before that change, it could have been possible to
    do the following:
    
       set(DCMTK_DIR ${CTK_DCMTK_DIR})
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19878 3bd1e089-480b-0410-8dfb-8563597acbee
  4. COMP: Set default EXTENSION_{SOURCE_DIR , SUPERBUILD_BINARY_DIR} to a…

    jcfr committed Apr 11, 2012
    …ccommodate most use cases
    
    To support the case (scenario 2) where the extension building code is
    inside a sub-directory of your project (ie Plastimatch), it makes sens
    to set the default of these variables to respectively CMAKE_SOURCE_DIR
    and CMAKE_BINARY_DIR.
    
    
    
      Scenario1 (usual):
    
       root
         |-- CMakeLists.txt  <= Extension description
         |
         |--- A/CMaekLists.txt
    
    
    
      Scenario2:
    
       root
         |-- CMakeLists.txt
         |
         |--- A/CMaekLists.txt <= Extension description
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19877 3bd1e089-480b-0410-8dfb-8563597acbee
  5. BUG: Prevent error by not building wrapped {MRML,Logic} python librar…

    jcfr committed Apr 11, 2012
    …ies if BUILD_SHARED ON
    
    * The call to "set_target_properties" was failing because the corresponding
    target wasn't existing.
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19876 3bd1e089-480b-0410-8dfb-8563597acbee
  6. ENH: Within extension, MIDAS_PACKAGE_{URL, EMAIL, API_KEY} are expose…

    jcfr committed Apr 11, 2012
    …d as option
    
    By default if the user doesn't specify a value, the upload to Midas will fail
    and the package will be uploaded to CDash.
    
    That said, no metadata are uploaded to CDash and the extension manager
    won't be able to communicate with CDash.
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19875 3bd1e089-480b-0410-8dfb-8563597acbee
  7. COMP: MIDASAPIUploadExtension also considers the optional extension m…

    jcfr committed Apr 11, 2012
    …etadata
    
    *
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19874 3bd1e089-480b-0410-8dfb-8563597acbee
  8. COMP: Ensure extension STATUS metadata is properly considered

    jcfr committed Apr 11, 2012
    Note that currently the value of this metadata is not uploaded to midas
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19873 3bd1e089-480b-0410-8dfb-8563597acbee
  9. COMP: Option extension metadata should be consistently considered.

    jcfr committed Apr 11, 2012
    In file "SlicerBlockBuildPackageAndUploadExtensions", the following
    variables where described as expected whereas they are optional.
    
      EXTENSION_ICONURL
      EXTENSION_CONTRIBUTORS
      EXTENSION_DESCRIPTION
      EXTENSION_SCREENSHOTURLS
    
    
    Note also that the mechanism to pass variable will be revised and
    simplified. So that default value, type of warning etc .. are all specifed
    in one location.
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19872 3bd1e089-480b-0410-8dfb-8563597acbee
  10. COMP: Prevent confusion by renaming CMake variable appropriately

    jcfr committed Apr 11, 2012
    * "expected_defined_vars" changed into "optional_vars"
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19871 3bd1e089-480b-0410-8dfb-8563597acbee
  11. COMP: Re-organize declaration of extension template metadata in a mea…

    jcfr committed Apr 11, 2012
    …ningful way
    
    * Required metedata are listed first
    
    * URL-like metadata are grouped together
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19870 3bd1e089-480b-0410-8dfb-8563597acbee
  12. BUG: Fix py_nomainwindow_SlicerSceneObserverTest by importing 'vtk' m…

    jcfr committed Apr 11, 2012
    …odule
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19869 3bd1e089-480b-0410-8dfb-8563597acbee
  13. BUG: Make sure test target specific to extension are not colliding wi…

    jcfr committed Apr 11, 2012
    …th existing ones.
    
    * By default the target will be named:
    
       Experimental
       ExperimentalUpload
    
       Nightly
       NightlyUpload
    
    If there ia already targets names "Experimental" or "Nightly", the
    following names will be used instead:
    
       ExperimentalExtension
       ExperimentalExtensionUpload
    
       NightlyExtension
       NightlyExtensionUpload
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19868 3bd1e089-480b-0410-8dfb-8563597acbee
  14. COMP: Include 'SlicerBlockModuleToExtensionMetadata' within UseSlicer…

    jcfr committed Apr 11, 2012
    ….cmake
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19867 3bd1e089-480b-0410-8dfb-8563597acbee
  15. COMP: Include 'SlicerBlockUploadExtensionPrerequisites' within UseSli…

    jcfr committed Apr 11, 2012
    …cer.cmake
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19866 3bd1e089-480b-0410-8dfb-8563597acbee
  16. COMP: "Slicer_INSTALL_*MODULE_*_DIR" set in UseSlicer.cmake along wit…

    jcfr committed Apr 11, 2012
    …h other variables.
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19865 3bd1e089-480b-0410-8dfb-8563597acbee
  17. STYLE: Remove extra comment.

    jcfr committed Apr 11, 2012
    This a follow up of r19860
    
    See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=19860
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19864 3bd1e089-480b-0410-8dfb-8563597acbee
  18. COMP: Move AdditionalLauncherSettings into a more meaningful location.

    jcfr committed Apr 11, 2012
    Its new home is the UseSlicer.cmake where the environment of an extension is
    setup.
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19863 3bd1e089-480b-0410-8dfb-8563597acbee
  19. COMP: Simplify organization - Testing macros are now included in UseS…

    jcfr committed Apr 11, 2012
    …licer.cmake
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19862 3bd1e089-480b-0410-8dfb-8563597acbee
  20. COMP: Prevent confusion by removing extra code from Superbuild extens…

    jcfr committed Apr 11, 2012
    …ion template.
    
    Since by default a superbuild extension can't be dropped in a Slicer
    source tree, let's remove the "if(Slicer_SOURCE_DIR)"
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19861 3bd1e089-480b-0410-8dfb-8563597acbee
  21. STYLE: Remove extra comment in extension templates

    jcfr committed Apr 11, 2012
    Since the location of the project() call may change, it's preferable not
    to indicate the current location.
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19860 3bd1e089-480b-0410-8dfb-8563597acbee
  22. COMP: Simplify extension template using MODULE_* variables

    jcfr committed Apr 11, 2012
    This is a follow up of r19855 [1]
    
    The idea is to facilitate the process involved to convert a slicer module
    into an extension.
    
    In case the extension contain one module, all metadata associated with
    an extension can be described using the "MODULE_*" variables.
    
    
    [1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=19855
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19859 3bd1e089-480b-0410-8dfb-8563597acbee
  23. COMP: More consistency by setting all extension default values in Use…

    jcfr committed Apr 11, 2012
    …Slicer.cmake
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19858 3bd1e089-480b-0410-8dfb-8563597acbee
  24. COMP: Modularize extension build system by creating "SlicerBlockAddit…

    jcfr committed Apr 11, 2012
    …ionalLauncherSettings"
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19857 3bd1e089-480b-0410-8dfb-8563597acbee
  25. COMP: Prevent a same author warning from being duplicated when config…

    jcfr committed Apr 11, 2012
    …uring extension.
    
    This is achieved by internally setting a variable <VARANME>_AUTHOR_WARN.
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19856 3bd1e089-480b-0410-8dfb-8563597acbee
  26. ENH: Reduce the overhead involved creating extension bundling exactly…

    jcfr committed Apr 11, 2012
    … ONE module
    
    The idea is to facilitate the process involved to convert a slicer module
    into an extension.
    
    In case the extension contain one module, all metadata associated with
    an extension can be described using the "MODULE_*" variables.
    
    In other word, assuming a module named "Foo" is already defined
    in Slicer using the following:
    
    // ----------------------
    ...
    set(MODULE_NAME Foo)
    set(MODULE_CATEGORY "Examples")
    set(MODULE_STATUS "Beta")
    set(MODULE_CONTRIBUTORS "Jean-Christophe Fillion-Robin (Kitware)")
    set(MODULE_DESCRIPTION "This is an example of Qt loadable module built as an extension")
    
    ...
    
    slicerMacroBuildQtModule(...)
    
    ...
    // ----------------------
    
    it could be converted into an extension by adding 9 lines.
    
    
    // ----------------------
    cmake_minimum_required(VERSION 2.8.7)
    ...
    set(MODULE_NAME Foo)
    set(MODULE_CATEGORY "Examples")
    set(MODULE_STATUS "Beta")
    set(MODULE_CONTRIBUTORS "Jean-Christophe Fillion-Robin (Kitware)")
    set(MODULE_DESCRIPTION "This is an example of Qt loadable module built as an extension")
    
    ...
    if(NOT Slicer_SOURCE_DIR)
      find_package(Slicer REQUIRED)
      include(${Slicer_USE_FILE})
    
      include(SlicerEnableExtensionTesting)
    endif()
    ...
    
    slicerMacroBuildQtModule(...)
    
    ...
    
    if(NOT Slicer_SOURCE_DIR)
      include(${Slicer_EXTENSION_CPACK})
    endif()
    // ----------------------
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19855 3bd1e089-480b-0410-8dfb-8563597acbee
  27. ENH: Ease usage of "Slicer_USE_FILE" by documenting and modularizing

    jcfr committed Apr 11, 2012
    * The file has been commented
    
    * The "behavior" of the file can be customized using Slicer_SKIP_* variables
    
    * Convenient functions/macros has also been introduced:
      slicer_check_variable
      slicer_setting_variable_message
      _slicer_skip_message
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19854 3bd1e089-480b-0410-8dfb-8563597acbee
  28. COMP: Ensure environment is set when running "out-of-source" scripted…

    jcfr committed Apr 11, 2012
    … modules tests.
    
    This is a follow up to r19827 [1] where it was mentioned that
    
       "PYTHONPATH is updated so that python module associated with
       a module could be imported. For example, the scripted module."
    
    It resumes that at the time of that commit, this was an incorrect statement.
    Indeed, the python macro defined in SlicerMacroPythonTesting where
    relying on "Slicer_LAUNCHER_EXECUTABLE" whereas the variable updated
    with '--launcher-additional-settings' was "Slicer_LAUNCH_COMMAND".
    
    This commit set the command line option specific to launcher additional settings
    into a variable that could be re-used:
    
        Slicer_ADDITIONAL_LAUNCHER_SETTINGS
    
    The macro SLICER_ADD_PYTHON_TEST and SLICER_ADD_PYTHON_UNITTEST have been
    updated to consider that variable.
    
    [1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=19827
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19853 3bd1e089-480b-0410-8dfb-8563597acbee
  29. BUG: Ensure generic Python module tests pass when build as extension

    jcfr committed Apr 11, 2012
    After commit r19844 that ensure that python unittest will fail if it applies,
    a problem associated with generic python module tests has been discovered.
    
    The following error message was displayed:
    
       AttributeError: 'module' object has no attribute 'scriptedloadableextensiontemplate'
    
    
    This was explained by the fact the path where the module was located
    wasn't considered by the module factory manager.
    
    To address that problem, a new command line option named
    
      --additional-module-paths
    
    has been added.
    
    
    The given list of path will added to the factory module manager.
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@19852 3bd1e089-480b-0410-8dfb-8563597acbee