Skip to content

Conversation

@jcfr
Copy link
Member

@jcfr jcfr commented Feb 4, 2015

...gets

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 can be enabled in your 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 associated CLI test with the same folder, a variable named
<MODULE_NAME>_TARGETS_FOLDER is set in the current scope each time
the macro SEMMacroBuildCLI is called.

…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.
@jcfr jcfr force-pushed the update-sem-build-macro-to-support-target-folder branch from dce829e to 0b780eb Compare February 4, 2015 23:06
jcfr added a commit that referenced this pull request Feb 4, 2015
…rget-folder

ENH: SEMMacroBuildCLI - Add possibility to associate FOLDER with CLI tar...
@jcfr jcfr merged commit b31b424 into Slicer:master Feb 4, 2015
@jcfr jcfr deleted the update-sem-build-macro-to-support-target-folder branch February 4, 2015 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant