[Insight-developers] CMake variables and preprocessor directives

Brad King brad.king at kitware.com
Thu Feb 20 09:52:06 EST 2014


On 02/19/2014 03:08 PM, Padfield, Dirk R (GE Global Research) wrote:
> This did not work, so I tried putting the same line in the
> itkConfigure.h.in of my local project, but that didn't work either.

No central header in ITK lists all the modules because the set
that is loaded is not known until the application calls the
find_package(ITK) command.  It can specify a subset of modules.

You should configure it into a local header.  The line

 #cmakedefine ITKReview_LOADED

should work with configure_file as long as it occurs after the
find_package(ITK) call.  Local testing works for me.

-Brad



More information about the Insight-developers mailing list