View Issue Details

IDProjectCategoryView StatusLast Update
0002465Slicer4Core: Building (CMake, Superbuild)public2012-10-24 05:58
Reporterjcfr Assigned Tosankhesh  
PriorityurgentSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.2.0 
Summary0002465: SlicerConfig - Ensure CMake search path specific to external project are added in order
Description

Looking at SlicerConfig [1], we can see that the CMake search path is updated after all calls to "find_package" have been done.

Since CTK provide a custom findDCMTK.cmake, the CMake search path should be updated after each external project "find_package" has been done.

That was, assuming CTK project is included before DCMTK, it will allow the appropriate DCMTK module to be used.

The solution could be implemented as described below:

Line 344 before the foreach look in charge of calling "find_package...", variable like the following one could be set:

set(Slicer_VTK_CMAKE_MODULE_PATHS "${VTK_CMAKE_DIR}")
set(Slicer_CTK_CMAKE_MODULE_PATHS "${CTK_CMAKE_DIR}" "${CTK_CMAKE_UTILITIES_DIR}")

After "find_package(${proj} REQUIRED)" (line 347), the following could be added:

if(DEFINED Slicer_<projectname>_CMAKE_MODULEPATHS)
foreach(path ${Slicer
<projectname>_CMAKE_MODULE_PATHS})

Update CMake module path

set(CMAKE_MODULE_PATH
  ${path}
  ${CMAKE_MODULE_PATH}
  )

endforeach()
endif()

[1] https://github.com/Slicer/Slicer/blob/master/CMake/SlicerConfig.cmake.in#L358

TagsNo tags attached.

Activities

sankhesh

sankhesh

2012-09-25 08:52

developer   ~0006203

This commit fixes the issue:
https://github.com/sankhesh/Slicer/commit/7641ee086447080d1e8b4be8dfa0ad9851f6787e

jcfr

jcfr

2012-09-25 09:17

administrator   ~0006204

See comments: https://github.com/sankhesh/Slicer/commit/7641ee086447080d1e8b4be8dfa0ad9851f6787e#commitcomment-1902919

sankhesh

sankhesh

2012-09-25 09:58

developer   ~0006205

Last edited: 2012-09-25 10:00

Addressed the comments in this commit:
https://github.com/sankhesh/Slicer/commit/5a5ed44799f8dbd973f2efc7960e5178c759172d

jcfr

jcfr

2012-09-25 10:14

administrator   ~0006206

Please squash commits. Only one commit should end up in Slicer. Thnaks

jcfr

jcfr

2012-09-27 13:18

administrator   ~0006252

Fixed in r21070
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=21070

jcfr

jcfr

2012-09-27 13:20

administrator   ~0006253

Fixed indent and comments in r21071
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=21071

nicole

nicole

2012-09-28 06:16

administrator   ~0006260

Last edited: 2012-09-28 06:27

Reporting extension is no longer building, not finding the CTK CMake directory with ctkMacroCompilePythonScript.cmake:

CMake Error at /projects/birn/nicole/Slicer4/Slicer4/CMake/SlicerMacroPythonWrapModuleVTKLibrary.cmake:86 (include):
include could not find load file:

ctkMacroCompilePythonScript

Call Stack (most recent call first):
/projects/birn/nicole/Slicer4/Slicer4/CMake/SlicerMacroBuildModuleMRML.cmake:68 (SlicerMacroPythonWrapModuleVTKLibrary)
MRML/CMakeLists.txt:22 (SlicerMacroBuildModuleMRML)

CMake Error at /projects/birn/nicole/Slicer4/Slicer4/CMake/SlicerMacroPythonWrapModuleVTKLibrary.cmake:87 (ctkMacroCompilePythonScript):
Unknown CMake command "ctkMacroCompilePythonScript".
Call Stack (most recent call first):
/projects/birn/nicole/Slicer4/Slicer4/CMake/SlicerMacroBuildModuleMRML.cmake:68 (SlicerMacroPythonWrapModuleVTKLibrary)
MRML/CMakeLists.txt:22 (SlicerMacroBuildModuleMRML)

Dashboard:
http://slicer.cdash.org/viewConfigure.php?buildid=40784

jcfr

jcfr

2012-09-28 06:27

administrator   ~0006261

Last edited: 2012-09-28 06:29

FYI - Just tried to build Reporting extension against my Slicer build tree and seems there are no issues.

What I did to build the extension:

git clone git://github.com/fedorov/Reporting.git
mkdir Reporting-build
cd Reporting-build
cmake -DSlicer_DIR:PATH=/path/to/Slicer-Superbuild/Slicer-build ../Reporting
make -j4

sankhesh

sankhesh

2012-09-28 07:37

developer   ~0006263

Nicole: This branch should fix the issue. Can you test it:
https://github.com/sankhesh/Slicer/commit/6e2480412cf09655ca32ac24452c9d84bdb81070

nicole

nicole

2012-09-28 07:53

administrator   ~0006264

That works for me, thanks!

sankhesh

sankhesh

2012-09-28 08:13

developer   ~0006265

Fixed in r21073

Issue History

Date Modified Username Field Change
2012-09-03 08:13 jcfr New Issue
2012-09-03 08:13 jcfr Status new => assigned
2012-09-03 08:13 jcfr Assigned To => jcfr
2012-09-03 08:14 jcfr Assigned To jcfr => sankhesh
2012-09-03 08:14 jcfr Target Version => Slicer 4.2.0 - Feature freeze Sept 1st 2012
2012-09-25 08:52 sankhesh Note Added: 0006203
2012-09-25 09:17 jcfr Note Added: 0006204
2012-09-25 09:58 sankhesh Note Added: 0006205
2012-09-25 10:00 sankhesh Note Edited: 0006205
2012-09-25 10:14 jcfr Note Added: 0006206
2012-09-27 12:46 sankhesh Status assigned => resolved
2012-09-27 12:46 sankhesh Resolution open => fixed
2012-09-27 13:18 jcfr Note Added: 0006252
2012-09-27 13:20 jcfr Note Added: 0006253
2012-09-28 06:16 nicole Note Added: 0006260
2012-09-28 06:16 nicole Status resolved => feedback
2012-09-28 06:16 nicole Resolution fixed => reopened
2012-09-28 06:21 jcfr Priority normal => immediate
2012-09-28 06:21 jcfr Status feedback => assigned
2012-09-28 06:22 jcfr Priority immediate => urgent
2012-09-28 06:27 nicole Note Edited: 0006260
2012-09-28 06:27 jcfr Note Added: 0006261
2012-09-28 06:29 jcfr Note Edited: 0006261
2012-09-28 07:37 sankhesh Note Added: 0006263
2012-09-28 07:53 nicole Note Added: 0006264
2012-09-28 08:13 sankhesh Note Added: 0006265
2012-09-28 08:13 sankhesh Status assigned => resolved
2012-09-28 08:13 sankhesh Resolution reopened => fixed
2012-10-24 05:58 jcfr Status resolved => closed
2012-10-24 05:58 jcfr Fixed in Version => Slicer 4.2.0 - coming release