<commit_before># this file is used directly from VTK/CMakeLists.txt, not from VTK/Wrapping/CMakeLists.txt

IF(JAVA_COMPILE)
  SET(VTK_JAVA_DEPENDENCIES "")
  INCLUDE(${VTK_BINARY_DIR}/Common/JavaDependencies.cmake OPTIONAL)
  INCLUDE(${VTK_BINARY_DIR}/Filtering/JavaDependencies.cmake OPTIONAL)
  INCLUDE(${VTK_BINARY_DIR}/IO/JavaDependencies.cmake OPTIONAL)
  INCLUDE(${VTK_BINARY_DIR}/Graphics/JavaDependencies.cmake OPTIONAL)
  INCLUDE(${VTK_BINARY_DIR}/GenericFiltering/JavaDependencies.cmake OPTIONAL)
  INCLUDE(${VTK_BINARY_DIR}/Imaging/JavaDependencies.cmake OPTIONAL)
  IF (VTK_USE_RENDERING)
    INCLUDE(${VTK_BINARY_DIR}/Rendering/JavaDependencies.cmake OPTIONAL)
    INCLUDE(${VTK_BINARY_DIR}/VolumeRendering/JavaDependencies.cmake OPTIONAL)
    INCLUDE(${VTK_BINARY_DIR}/Hybrid/JavaDependencies.cmake OPTIONAL)
    INCLUDE(${VTK_BINARY_DIR}/Widgets/JavaDependencies.cmake OPTIONAL)
  ENDIF(VTK_USE_RENDERING)
  IF (VTK_USE_PARALLEL)
    INCLUDE(${VTK_BINARY_DIR}/Parallel/JavaDependencies.cmake OPTIONAL)
  ENDIF(VTK_USE_PARALLEL)
  IF (VTK_USE_INFOVIS)
    INCLUDE(${VTK_BINARY_DIR}/Infovis/JavaDependencies.cmake OPTIONAL)
  ENDIF(VTK_USE_INFOVIS)
  IF (VTK_USE_VIEWS)
    INCLUDE(${VTK_BINARY_DIR}/Views/JavaDependencies.cmake OPTIONAL)
  ENDIF(VTK_USE_VIEWS)

  SET(VTK_JAVA_NEW_STYLE 0)
  IF(COMMAND VTK_GENERATE_JAVA_DEPENDENCIES)
    IF(VTK_JAVA_DEPENDENCIES)
      SET(VTK_JAVA_NEW_STYLE 1)
    ENDIF(VTK_JAVA_DEPENDENCIES)
  ENDIF(COMMAND VTK_GENERATE_JAVA_DEPENDENCIES)

  IF(NOT VTK_JAR_PATH)
    SET(VTK_JAR_PATH "${LIBRARY_OUTPUT_PATH}")
  ENDIF(NOT VTK_JAR_PATH)

  IF(VTK_JAVA_NEW_STYLE)
    SET(CLASS_FILES ${VTK_JAVA_DEPENDENCIES})
    STRING(REGEX REPLACE "\\.java" ".class;" CLASS_FILES ${VTK_JAVA_DEPENDENCIES})
    ADD_CUSTOM_TARGET(VTKJava ALL)
    ADD_CUSTOM_TARGET(VTKJavaJar ALL)

    SET(KITS Common Filtering IO Graphics GenericFiltering Imaging)
    IF (VTK_USE_RENDERING)
      SET(KITS ${KITS} Rendering)
      SET(KITS ${KITS} VolumeRendering)
      SET(KITS ${KITS} Hybrid)
      SET(KITS ${KITS} Widgets)
    ENDIF(VTK_USE_RENDERING)
    IF (VTK_USE_PARALLEL)
      SET(KITS ${KITS} Parallel)
    ENDIF(VTK_USE_PARALLEL)
    IF (VTK_USE_INFOVIS)
      SET(KITS ${KITS} Infovis)
    ENDIF(VTK_USE_INFOVIS)
    IF (VTK_USE_VIEWS)
      SET(KITS ${KITS} Views)
    ENDIF(VTK_USE_VIEWS)

    # Some platforms have libjvm in a subdirectory from
    # the rest of the java libraries and are missing the symlink.
    IF(JAVA_AWT_LIBRARY)
      FOREACH(__java_library ${JAVA_AWT_LIBRARY})
        GET_FILENAME_COMPONENT(JAVA_LIB_DIR ${__java_library} PATH)
        IF(EXISTS ${JAVA_LIB_DIR}/xawt)
          LINK_DIRECTORIES(${JAVA_LIB_DIR}/xawt)
        ENDIF(EXISTS ${JAVA_LIB_DIR}/xawt)
        IF(EXISTS ${JAVA_LIB_DIR}/client)
          LINK_DIRECTORIES(${JAVA_LIB_DIR}/client)
        ENDIF(EXISTS ${JAVA_LIB_DIR}/client)
        IF(EXISTS ${JAVA_LIB_DIR}/server)
          LINK_DIRECTORIES(${JAVA_LIB_DIR}/server)
        ENDIF(EXISTS ${JAVA_LIB_DIR}/server)
      ENDFOREACH(__java_library)
    ENDIF(JAVA_AWT_LIBRARY)
    SET(CMAKE_SKIP_RPATH 0)
    ADD_EXECUTABLE(VTKJavaExecutable VTKJava.cxx)
    SET(JAVA_LIBRARIES)

    SET(VTK_BUILD_ALL_CONTENT "")
    SET(VTK_BUILD_ALL_DEPENDS "")

    FOREACH(kit ${KITS})
      IF(APPLE)
        SET(src ${VTK_JAR_PATH}/libvtk${kit}Java.dylib)
        SET(tgt ${VTK_JAR_PATH}/libvtk${kit}Java.jnilib)
        ADD_CUSTOM_COMMAND(OUTPUT ${tgt}
                           COMMAND ln
                           ARGS -sf ${src} ${tgt}
                           DEPENDS ${src})
        SET(JAVA_LIBRARIES ${JAVA_LIBRARIES} ${tgt})
      ENDIF(APPLE)
      TARGET_LINK_LIBRARIES(VTKJavaExecutable vtk${kit}Java)
      SET(VTK_JAVA_DEPENDENCIES "")
      ADD_CUSTOM_TARGET(VTKJava${kit} ALL)
      SET(VTK_BUILD_ALL_CONTENT
        "${VTK_BUILD_ALL_CONTENT}\n    vtk.vtkVTKJava${kit}Driver.Initialize(args);")
      SET(VTK_BUILD_ALL_DEPENDS
        ${VTK_BUILD_ALL_DEPENDS} 
        ${VTK_BINARY_DIR}/java/vtk/vtkVTKJava${kit}Driver.java)
      INCLUDE(${VTK_BINARY_DIR}/${kit}/JavaDependencies.cmake OPTIONAL)
      VTK_GENERATE_JAVA_DEPENDENCIES(VTKJava${kit} ${VTK_JAVA_DEPENDENCIES})
      #ADD_DEPENDENCIES(VTKJava${kit} VTKJavaExecutable)
      ADD_DEPENDENCIES(VTKJava${kit} vtk${kit}JavaJavaClasses)
      #ADD_DEPENDENCIES(VTKJavaJar VTKJava${kit})
    ENDFOREACH(kit)

    CONFIGURE_FILE(${VTK_SOURCE_DIR}/Wrapping/Java/vtkBuildAllDriver.java.in
      ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.java)
    ADD_CUSTOM_TARGET(VTKBuildAll ALL)

    CONFIGURE_FILE(${VTK_SOURCE_DIR}/Wrapping/Java/vtk/vtkGlobalJavaHash.java
      ${VTK_BINARY_DIR}/java/vtk/vtkGlobalJavaHash.java COPYONLY)
      
#    ADD_CUSTOM_COMMAND(OUTPUT ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.class
#      COMMAND ${JAVA_COMPILE}
#      ARGS -classpath ${VTK_JAVA_HOME}/.. -d ${VTK_JAVA_HOME}/.. ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.java
#      DEPENDS ${VTK_BUILD_ALL_DEPENDS})

    ADD_CUSTOM_COMMAND(
      TARGET VTKBuildAll
      OUTPUTS ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.class
      DEPENDS ${VTK_BUILD_ALL_DEPENDS}
      SOURCE ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.java
      COMMAND ${JAVA_COMPILE}
      ARGS -classpath ${VTK_JAVA_HOME}/.. -d ${VTK_JAVA_HOME}/.. 
      ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.java<commit_msg>COMP: Configure vtkPanel and vtkCanvas over to the build tree to avoid dependency errors.<commit_after># this file is used directly from VTK/CMakeLists.txt, not from VTK/Wrapping/CMakeLists.txt

IF(JAVA_COMPILE)
  SET(VTK_JAVA_DEPENDENCIES "")
  INCLUDE(${VTK_BINARY_DIR}/Common/JavaDependencies.cmake OPTIONAL)
  INCLUDE(${VTK_BINARY_DIR}/Filtering/JavaDependencies.cmake OPTIONAL)
  INCLUDE(${VTK_BINARY_DIR}/IO/JavaDependencies.cmake OPTIONAL)
  INCLUDE(${VTK_BINARY_DIR}/Graphics/JavaDependencies.cmake OPTIONAL)
  INCLUDE(${VTK_BINARY_DIR}/GenericFiltering/JavaDependencies.cmake OPTIONAL)
  INCLUDE(${VTK_BINARY_DIR}/Imaging/JavaDependencies.cmake OPTIONAL)
  IF (VTK_USE_RENDERING)
    INCLUDE(${VTK_BINARY_DIR}/Rendering/JavaDependencies.cmake OPTIONAL)
    INCLUDE(${VTK_BINARY_DIR}/VolumeRendering/JavaDependencies.cmake OPTIONAL)
    INCLUDE(${VTK_BINARY_DIR}/Hybrid/JavaDependencies.cmake OPTIONAL)
    INCLUDE(${VTK_BINARY_DIR}/Widgets/JavaDependencies.cmake OPTIONAL)
  ENDIF(VTK_USE_RENDERING)
  IF (VTK_USE_PARALLEL)
    INCLUDE(${VTK_BINARY_DIR}/Parallel/JavaDependencies.cmake OPTIONAL)
  ENDIF(VTK_USE_PARALLEL)
  IF (VTK_USE_INFOVIS)
    INCLUDE(${VTK_BINARY_DIR}/Infovis/JavaDependencies.cmake OPTIONAL)
  ENDIF(VTK_USE_INFOVIS)
  IF (VTK_USE_VIEWS)
    INCLUDE(${VTK_BINARY_DIR}/Views/JavaDependencies.cmake OPTIONAL)
  ENDIF(VTK_USE_VIEWS)

  SET(VTK_JAVA_NEW_STYLE 0)
  IF(COMMAND VTK_GENERATE_JAVA_DEPENDENCIES)
    IF(VTK_JAVA_DEPENDENCIES)
      SET(VTK_JAVA_NEW_STYLE 1)
    ENDIF(VTK_JAVA_DEPENDENCIES)
  ENDIF(COMMAND VTK_GENERATE_JAVA_DEPENDENCIES)

  IF(NOT VTK_JAR_PATH)
    SET(VTK_JAR_PATH "${LIBRARY_OUTPUT_PATH}")
  ENDIF(NOT VTK_JAR_PATH)

  IF(VTK_JAVA_NEW_STYLE)
    SET(CLASS_FILES ${VTK_JAVA_DEPENDENCIES})
    STRING(REGEX REPLACE "\\.java" ".class;" CLASS_FILES ${VTK_JAVA_DEPENDENCIES})
    ADD_CUSTOM_TARGET(VTKJava ALL)
    ADD_CUSTOM_TARGET(VTKJavaJar ALL)

    SET(KITS Common Filtering IO Graphics GenericFiltering Imaging)
    IF (VTK_USE_RENDERING)
      SET(KITS ${KITS} Rendering)
      SET(KITS ${KITS} VolumeRendering)
      SET(KITS ${KITS} Hybrid)
      SET(KITS ${KITS} Widgets)
    ENDIF(VTK_USE_RENDERING)
    IF (VTK_USE_PARALLEL)
      SET(KITS ${KITS} Parallel)
    ENDIF(VTK_USE_PARALLEL)
    IF (VTK_USE_INFOVIS)
      SET(KITS ${KITS} Infovis)
    ENDIF(VTK_USE_INFOVIS)
    IF (VTK_USE_VIEWS)
      SET(KITS ${KITS} Views)
    ENDIF(VTK_USE_VIEWS)

    # Some platforms have libjvm in a subdirectory from
    # the rest of the java libraries and are missing the symlink.
    IF(JAVA_AWT_LIBRARY)
      FOREACH(__java_library ${JAVA_AWT_LIBRARY})
        GET_FILENAME_COMPONENT(JAVA_LIB_DIR ${__java_library} PATH)
        IF(EXISTS ${JAVA_LIB_DIR}/xawt)
          LINK_DIRECTORIES(${JAVA_LIB_DIR}/xawt)
        ENDIF(EXISTS ${JAVA_LIB_DIR}/xawt)
        IF(EXISTS ${JAVA_LIB_DIR}/client)
          LINK_DIRECTORIES(${JAVA_LIB_DIR}/client)
        ENDIF(EXISTS ${JAVA_LIB_DIR}/client)
        IF(EXISTS ${JAVA_LIB_DIR}/server)
          LINK_DIRECTORIES(${JAVA_LIB_DIR}/server)
        ENDIF(EXISTS ${JAVA_LIB_DIR}/server)
      ENDFOREACH(__java_library)
    ENDIF(JAVA_AWT_LIBRARY)
    SET(CMAKE_SKIP_RPATH 0)
    ADD_EXECUTABLE(VTKJavaExecutable VTKJava.cxx)
    SET(JAVA_LIBRARIES)

    SET(VTK_BUILD_ALL_CONTENT "")
    SET(VTK_BUILD_ALL_DEPENDS "")

    FOREACH(kit ${KITS})
      IF(APPLE)
        SET(src ${VTK_JAR_PATH}/libvtk${kit}Java.dylib)
        SET(tgt ${VTK_JAR_PATH}/libvtk${kit}Java.jnilib)
        ADD_CUSTOM_COMMAND(OUTPUT ${tgt}
                           COMMAND ln
                           ARGS -sf ${src} ${tgt}
                           DEPENDS ${src})
        SET(JAVA_LIBRARIES ${JAVA_LIBRARIES} ${tgt})
      ENDIF(APPLE)
      TARGET_LINK_LIBRARIES(VTKJavaExecutable vtk${kit}Java)
      SET(VTK_JAVA_DEPENDENCIES "")
      ADD_CUSTOM_TARGET(VTKJava${kit} ALL)
      SET(VTK_BUILD_ALL_CONTENT
        "${VTK_BUILD_ALL_CONTENT}\n    vtk.vtkVTKJava${kit}Driver.Initialize(args);")
      SET(VTK_BUILD_ALL_DEPENDS
        ${VTK_BUILD_ALL_DEPENDS} 
        ${VTK_BINARY_DIR}/java/vtk/vtkVTKJava${kit}Driver.java)
      INCLUDE(${VTK_BINARY_DIR}/${kit}/JavaDependencies.cmake OPTIONAL)
      VTK_GENERATE_JAVA_DEPENDENCIES(VTKJava${kit} ${VTK_JAVA_DEPENDENCIES})
      #ADD_DEPENDENCIES(VTKJava${kit} VTKJavaExecutable)
      ADD_DEPENDENCIES(VTKJava${kit} vtk${kit}JavaJavaClasses)
      #ADD_DEPENDENCIES(VTKJavaJar VTKJava${kit})
    ENDFOREACH(kit)

    CONFIGURE_FILE(${VTK_SOURCE_DIR}/Wrapping/Java/vtkBuildAllDriver.java.in
      ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.java)
    ADD_CUSTOM_TARGET(VTKBuildAll ALL)

    CONFIGURE_FILE(${VTK_SOURCE_DIR}/Wrapping/Java/vtk/vtkGlobalJavaHash.java
      ${VTK_BINARY_DIR}/java/vtk/vtkGlobalJavaHash.java COPYONLY)
      
    CONFIGURE_FILE(${VTK_SOURCE_DIR}/Wrapping/Java/vtk/vtkCanvas.java
      ${VTK_BINARY_DIR}/java/vtk/vtkCanvas.java COPYONLY)
      
    CONFIGURE_FILE(${VTK_SOURCE_DIR}/Wrapping/Java/vtk/vtkPanel.java
      ${VTK_BINARY_DIR}/java/vtk/vtkPanel.java COPYONLY)
      
#    ADD_CUSTOM_COMMAND(OUTPUT ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.class
#      COMMAND ${JAVA_COMPILE}
#      ARGS -classpath ${VTK_JAVA_HOME}/.. -d ${VTK_JAVA_HOME}/.. ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.java
#      DEPENDS ${VTK_BUILD_ALL_DEPENDS})

    ADD_CUSTOM_COMMAND(
      TARGET VTKBuildAll
      OUTPUTS ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.class
      DEPENDS ${VTK_BUILD_ALL_DEPENDS}
      SOURCE ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.java
      COMMAND ${JAVA_COMPILE}
      ARGS -classpath ${VTK_JAVA_HOME}/.. -d ${VTK_JAVA_HOME}/.. 
      ${VTK_BINARY_DIR}/java/vtk/vtkBuildAllDriver.java
{'fraction_non_alphanumeric': 0.10875090777051562, 'fraction_numerical': 0.0005446623093681918, 'mean_word_length': 4.169873298920694, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2106070', 'n_tokens_mistral': 4694, 'n_tokens_neox': 4431, 'n_words': 514}