[vtk-developers] VTK Install Rules and Cross Compiling and ...

Pat Marion pat.marion at kitware.com
Sun Aug 5 15:24:02 EDT 2012


Hi Utkarsh,

You probably explained it but I didn't read carefully.  Would
vtk_target_export(...) and vtk_build_tools_target(...) export targets to
different files?

VES uses vtk cross compiling for iOS and Android.  Right now, VES builds
against a specific sha1 of VTK master from several months ago, but I could
setup a new dashboard that uses VTK master.  Does the
vtk_build_tools_target(...) macro correctly add the targets to a custom
target, so you can run- make vtkCompileTools (for example) and it compiles
just the compile tools and dependencies and nothing extra?

Pat



On Sun, Aug 5, 2012 at 11:56 AM, Utkarsh Ayachit <
utkarsh.ayachit at kitware.com> wrote:

> Folks,
>
> To give you some background, I am working on updating ParaView to
> become simply a VTK with extra modules. As I am doing this here are
> few problems that I noticed, or maybe I'm just missing something
> obvious:
>
> 1. To support CrossCompiling, ParaView/VTK provides funky variables
> EXPORT_EXECUTABLES_FILE, EXPORT_EXECUTABLES_NAMESPACE to which it
> expects all compilation tools targets to be exported. However
> vtkWrapHierarchy, vtkWrapPython etc., all use the macro
> vtk_target(...) to set up the install rules. Now, vtk_target(..) uses
> vtk_export(...) which exports to the VTK_EXPORTS_FILE file -- that's
> issue number 1. Secondly, vtk_export(..) uses the variable
> VTK_INSTALL_NO_LIBRARIES to decide if the targets should be exported,
> that seems incorrect. If anything, for these executables, we should be
> checking VTK_INSTALL_NO_DEVELOPMENT, isn't it?
>
> 2. vtk_target_export(...) which adds the export(..) calls to allow
> external projects to use VTK build trees export the targets after
> checking VTK_INSTALL_NO_LIBRARIES variable. Isn't that incorrect?
> IMHO, export(..) should be added without any such VTK_INSTALL_NO_*
> conditions. These variables dictate what "make install" does. I may
> want to build a VTK where "make install" will only install the
> executables, no libraries, but I may still want to build other
> projects dependent on VTK directly by referring to the build
> directory.
>
> 3. EXPORT_EXECUTABLES_FILE is never written out (and installed too
> when VTK_INSTALL_NO_DEVELOPMENT is FALSE). Also, I am wondering if
> VTKConfig or VTKTargets should import this file too (for install
> directory version, it doesn't matter since if
> VTK_INSTALL_NO_DEVELOPMENT was true, the development tools targets are
> installed to the VTK_EXPORTS_FILE anyways, which I think is the right
> behavior). That way projects depending on VTK will see the compile
> tools too without having to do anything extra.
>
> Here's my proposal:
>
> a. Add a new vtk_build_tools_target(...) macro. This macro will be
> used for all executable targets that VTK builds which are build tools
> e.g. vtkWrapHierarchy, vtkWrapTclInit etc.
> b. vtk_build_tools_target(...) will add install(...) rules, only when
> VTK_INSTALL_NO_DEVELOPMENT is false, and *always* add export(...)
> rules if EXPORT_EXECUTABLES_FILE is specified for exporting build-dir
> targets to the EXPORT_EXECUTABLES_FILE.
>
> b. All locations building these compile tools executables should
> ensure that CMAKE_CROSSCOMPILING is FALSE (which is already the case,
> but just to be sure).
>
> c. vtk_target_export(...), used for exporting module libraries should
> add the export(...) call irrespective of the state of
> VTK_INSTALL_NO_LIBRARIES. VTK_INSTALL_NO_* variables should be used to
> decide whether to make the install(...) calls, not the export(...)
> calls.
>
> d. EXPORT_EXECUTABLES_FILE, EXPORT_EXECUTABLES_NAMESPACE should be
> renamed. These are only used for build/compile tools, so maybe call
> them EXPORT_COMPILE_TOOLS_FILE, EXPORT_COMPILE_TOOLS_NAMESPACE or
> something more obvious.
>
> Once we have decided the path forward, I volunteer to make these changes.
>
> Utkarsh
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120805/80ff3624/attachment.html>


More information about the vtk-developers mailing list