Import 2017-06-07 23:51:09: master ad1a9916

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-04-27 23:43:52 master e4243144
Changeset

ENH: Extension Wizard: Substitute CMake variable reference if possible.

In case the main CMakeLists.txt of an extension contain references
to CMake variable, these will be expanded if possible.

For example, if the CMakeLists.txt contains the following:

set(EXTENSION_DESCRIPTION "The ${PROJECT_NAME} module provides Slicer user with any easy way to export models into a KiwiViewer scene file.")

the generated description file will have the following description:

description The SlicerToKiwiExporter module provides Slicer user with any easy way to export models into a KiwiViewer scene file.

Note also that nested variable references are now partially handled.
For example, if we consider the following CMake code:

set(foo "world")
set(hello_${foo} "sun")
set(world_hello "earth")

set(description "${hello_${foo}} and ${${foo}_hello} are different")

Getting the value of description will return hello_world-NOTFOUND and earth are different

Reviewed-by: Matthew Woehlke <matthew.woehlke@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24196 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Utilities/Scripts/SlicerWizard/ExtensionDescription.py Diff File
mod - Utilities/Scripts/SlicerWizard/ExtensionProject.py Diff File