Hi Utkarsh,<br><br>You probably explained it but I didn't read carefully.  Would vtk_target_export(...) and vtk_build_tools_target(...) export targets to different files?<br><br>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?<br>

<br>Pat<br><br><br><br><div class="gmail_quote">On Sun, Aug 5, 2012 at 11:56 AM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span> wrote:<br>

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