[vtk-developers] dashboard failure with Java wrapping and Obj-C++?

David Gobbi david.gobbi at gmail.com
Wed Apr 11 15:40:39 EDT 2012


On Wed, Apr 11, 2012 at 1:21 PM, Marcus D. Hanwell
<marcus.hanwell at kitware.com> wrote:
> Hi,
>
> On Wed, Apr 11, 2012 at 3:10 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>> Hi Sean,
>>
>> The old Rendering/CMakeLists.txt had the following lines, were they
>> responsible for eliminating the error during the pre-modularization
>> build?
>>
>> # Fix for bug#1026 moved out of the common section.  This should be
>> # changed to add the flag only in the right places (CMAKE_CXX_FLAGS?).
>> IF(APPLE AND VTK_WRAP_JAVA)
>>  ADD_DEFINITIONS("-ObjC++")
>> ENDIF(APPLE AND VTK_WRAP_JAVA)
>>
> That does look suspiciously like the answer, we were looking into this
> (along with a few other failures). Thanks for pointing that out.

The fix would probably be along the lines of:

1)  In Rendering/Core/CMakeLists.txt,
define a new file property WRAP_JAVA_OBJC:

set_source_files_properties(
  vtkRenderWindow.cxx
  PROPERTIES WRAP_JAVA_OBJC 1
)

2) in CMake/vtkJavaWrapping.cmake,
check whether WRAP_JAVA_OBJC is set for each source file,
and if so add "-ObjC++" for the corresponding Java.cxx file.

Alternatively, a special case for vtkRenderWindowJava.cxx could be
hard-coded into vtkJavaWrapping.cmake, rather than defining a new
property that only applies to a single file in all of VTK.

 - David



More information about the vtk-developers mailing list