View Issue Details

IDProjectCategoryView StatusLast Update
0001902Slicer4Core: Building (CMake, Superbuild)public2012-05-08 15:08
Reporterschuhschuh Assigned Tojcfr  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.1.1Fixed in VersionSlicer 4.2.0 
Summary0001902: Slicer_SKIP_PROJECT_COMMAND not considered next to Slicer_SKIP_USE_FILE_INCLUDE_CHECK
Description

This applies to the current trunk r19895.

Right before the project() command in UseSlicer.cmake, it is checked whether the ${EXTENSION_NAME}_SOURCE_DIR is already defined, i.e., if the extension developer called project() prior to the include(UseSlicer.cmake).

This check can be disabled by setting Slicer_SKIP_USE_FILE_INCLUDE_CHECK. Another variable that allows to modify the code executed by UseSlicer.cmake is Slicer_SKIP_PROJECT_COMMAND. If this variable is set, but not Slicer_SKIP_USE_FILE_INCLUDE_CHECK, UseSlicer.cmake will yet raise a fatal error and ask the developer not to call project themselves. However, by setting Slicer_SKIP_PROJECT_COMMAND, the developer explicitly requested the UseSlicer.cmake file not to call project(), hence, the check should probably be skipped as well...

To be able to set Slicer_SKIP_USE_FILE_INCLUDE_CHECK without also setting Slicer_SKIP_PROJECT_COMMAND is reasonable and might be required in certain cases where this check gives a false alarm, yet the project() command should be invoked by UseSlicer.cmake. On the other side, if Slicer_SKIP_PROJECT_COMMAND is defined and TRUE, this should probably imply Slicer_SKIP_USE_FILE_INCLUDE_CHECK.

The "work-around" on the extension developer side is simple. Just set both Slicer_SKIP_PROJECT_COMMAND and Slicer_SKIP_USE_FILE_INCLUDE_CHECK to TRUE.

Find attached a patch of the proposed change.

TagsNo tags attached.

Activities

2012-04-14 19:10

 

jcfr

jcfr

2012-04-16 15:56

administrator   ~0004027

Fixed in r19901 - See https://github.com/Slicer/Slicer/commit/9e289de76008e1beda7ac4313953cb21f05858cc

If it works as expected, please make sure to close the issue.

Issue History

Date Modified Username Field Change
2012-04-14 19:10 schuhschuh New Issue
2012-04-14 19:10 schuhschuh Status new => assigned
2012-04-14 19:10 schuhschuh Assigned To => jcfr
2012-04-14 19:10 schuhschuh File Added: UseSlicerSkipUseFileIncludeCheckIfProjectCommandIsSkipped.patch
2012-04-16 15:56 jcfr Note Added: 0004027
2012-04-16 15:56 jcfr Status assigned => resolved
2012-04-16 15:56 jcfr Fixed in Version => Slicer 4.x AHM Summer 2012
2012-04-16 15:56 jcfr Resolution open => fixed
2012-04-16 16:03 schuhschuh Status resolved => closed
2012-05-08 15:08 jcfr Target Version => Slicer 4.1.1