[Insight-developers] Check module library dependencies?

Brad King brad.king at kitware.com
Thu Dec 15 17:24:31 EST 2011


On 12/15/2011 4:55 PM, Bradley Lowekamp wrote:
> http://www.cdash.org/CDash/viewBuildError.php?buildid=1821432
 >
 > This symbol is suppose to be defined in the Common library.

On this page click the [+] next to the command:

   Command  "/usr/bin/g++-4.0" [+]

You can see the full link command.  It does include

   "../../../../lib/libITKCommon-4.0.1.dylib"

as an argument so it is linking to ITKCommon.

> TransformBase/src/CMakeLists.txt:target_link_libraries(ITKIOTransformBase ${ITKTransform_LIBRARIES})
>
> It's not clear to me if ${ITKTransformBase_LIBRARIES} is suppose to be include there too?

There is no ITKTransformBase package AFAIK.  If you mean
ITKIOTransformBase_LIBRARIES then no, it does not belong there.

Just follow the module dependencies to see that ITKTransform
leads to ITKCommon.

  $ cat Modules/Core/Transform/itk-module.cmake
  itk_module(ITKTransform
    DEPENDS
      ITKStatistics
  ...
  $ cat Modules/Numerics/Statistics/itk-module.cmake
  itk_module(ITKStatistics
    DEPENDS
      ITKCommon
  ...

For modules that provide no libraries the modularization CMake code
automatically propagates the libraries of their dependencies.  One
can see that in the module information file:

  $ cat lib/cmake/ITK-4.0/Modules/ITKTransform.cmake
  set(ITKTransform_LOADED 1)
  set(ITKTransform_DEPENDS "ITKImageFilterBase;ITKStatistics")
  set(ITKTransform_LIBRARIES "ITKCommon;ITKStatistics")
  set(ITKTransform_INCLUDE_DIRS "/home/kingb/My Programs/GIT/ITK/Modules/Core/Transform/include")
  set(ITKTransform_LIBRARY_DIRS "")

ITKTransform_LIBRARIES directly contains ITKCommon.

-Brad K


More information about the Insight-developers mailing list