I have added a Slicer_EXTENSION_SOURCE_DIRS entry to my CMakeCache.txt for a Slicer build (Aug 1 nightly). I have entered the source directory for one extension, the SlicerExtension-VMTK, which depends on the external VMTK package. The build error I’m getting is that it can’t find the External_VMTK.cmake file.
What appears to be happening is the extension’s SuperBuild.cmake file calls a macro, ExternalProject_Include_Dependencies. I’ve searched, and there is a file that contains this macro in Slicer/CMake/ExternalProjectDependency.cmake, but that’s not the macro that gets called. Instead, it looks like it picks up the macro in the BRAINSTools extension, in Slicer-SuperBuild/BRAINSTools/CMake/ExternalProjectDependency.cmake. These files are very different.
The macro starts around line 450 of the file in BRAINSTools, and the error message I get is on line 639. There are three places it looks for the External_VMTK.cmake file:
The correct location is /workingdir/Extensions/SlicerExtension-VMTK/SuperBuild.
My questions are: which version of the macro should it be using? Is it calling the wrong one? Would the version of the macro in Slicer/CMake be able to pick up the correct location for the External_VMTK.cmake file? Is there a way to correct this?
Thanks very much. The full text of the error I get is below.
– Configuring extension directory: SlicerExtension-VMTK
CMake Warning (dev) at /short/Extensions/SlicerExtension-VMTK/CMakeLists.txt:4 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run “cmake --help-policy CMP0048” for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The following variable(s) would be set to empty:
PROJECT_VERSION PROJECT_VERSION_MAJOR PROJECT_VERSION_MINOR PROJECT_VERSION_PATCH
This warning is for project developers. Use -Wno-dev to suppress it.
– Checking EXTENSION_NAME variable
– Checking EXTENSION_NAME variable - NOTDEFINED
– Checking MODULE_NAME variable
– Checking MODULE_NAME variable - NOTDEFINED
– Checking PROJECT_NAME variable
– Checking PROJECT_NAME variable - SlicerVMTK
– Setting EXTENSION_NAME …: SlicerVMTK
– SuperBuild - First pass
CMake Error at /short/Slicer-SuperBuild/BRAINSTools/CMake/ExternalProjectDependency.cmake:639 (message):
Can’t find External_VMTK.cmake
Call Stack (most recent call first):
– Configuring incomplete, errors occurred!
See also “/short/Slicer-SuperBuild/Slicer-build/CMakeFiles/CMakeOutput.log”.
See also “/short/Slicer-SuperBuild/Slicer-build/CMakeFiles/CMakeError.log”.
make: *** [Slicer-prefix/src/Slicer-stamp/Slicer-configure] Error 1
make: *** [CMakeFiles/Slicer.dir/all] Error 2
make: *** [all] Error 2