<commit_before>PROJECT(VTK)
OPTION(BUILD_SHARED_LIBS "Build VTK with shared libraries." OFF)
OPTION(BUILD_EXAMPLES "Build VTK examples." OFF)
OPTION(VTK_USE_64BIT_IDS "Build VTK with 64 bit ids" OFF)

SUBDIRS(Wrapping Utilities Common Filtering Imaging Graphics IO)

SUBDIR_DEPENDS(Common Wrapping Utilities)
SUBDIR_DEPENDS(Filtering Common)
SUBDIR_DEPENDS(Imaging Filtering)
SUBDIR_DEPENDS(Graphics Filtering)
SUBDIR_DEPENDS(IO Filtering)

SET (LIBRARY_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all executables.")

SET (VTK_BINARY_PATH ${LIBRARY_OUTPUT_PATH} CACHE INTERNAL "Single output directory for building all libraries.")
SET (VTK_LIBRARY_PATH ${EXECUTABLE_OUTPUT_PATH} CACHE INTERNAL "Single output directory for building all executables.")

OPTION (VTK_USE_RENDERING "Build the rendering classes used for displaying" ON)
OPTION (VTK_DEBUG_LEAKS "Build leak checking support into vtk." OFF)
OPTION (VTK_USE_HYBRID "Build the hybrid directory classes")
OPTION (VTK_USE_PATENTED "Build the patented directory classes, these classes are patented and may require a license to use")
#ifdef __APPLE__
OPTION (VTK_USE_QUARTZ "Build classes for the Quartz window manager" OFF)
#endif
IF (CMAKE_HAS_X)
  OPTION(VTK_USE_X "Build classes for the X11 window manager" ON)
ENDIF (CMAKE_HAS_X)

OPTION (VTK_USE_PARALLEL "Build the parallel directory classes")
IF (VTK_USE_PARALLEL)
    OPTION (VTK_USE_MPI 
      "use MPI (Message Passing Interface) library for parallel support")
    IF(BUILD_TESTING)
     IF (DART_ROOT)
      IF (VTK_USE_MPI)
        FIND_PROGRAM(MPIRUN NAMES mpirun lamexec)
        SET (MPI_PREFLAGS "-np 2" CACHE STRING " Flags used by mpi start program.")
        SET (MPI_POSTFLAGS "" CACHE STRING " Flags used by mpi start program.")
      ENDIF (VTK_USE_MPI)
     ENDIF (DART_ROOT)
    ENDIF(BUILD_TESTING)
ENDIF (VTK_USE_PARALLEL)

OPTION (VTK_MANGLE_MESA "Use mangled Mesa with OpenGL" OFF)
IF (VTK_MANGLE_MESA)
  FIND_LIBRARY(MESA_LIBRARY MesaGL
  /usr/local/lib 
  )
  FIND_LIBRARY(MESA_OS_LIBRARY MesaOS
  /usr/local/lib 
  )
ENDIF (VTK_MANGLE_MESA)

OPTION(VTK_WRAP_TCL "wrap classes into the TCL intepreted language")
IF (VTK_WRAP_TCL)
  INCLUDE (${CMAKE_ROOT}/Modules/FindTCL.cmake)
  UTILITY_SOURCE(VTK_WRAP_TCL_EXE vtkWrapTcl Wrapping vtkWrapTcl.c)
  FIND_FILE(VTK_WRAP_HINTS hints ${VTK_SOURCE_DIR}/Wrapping )
  IF (EXECUTABLE_OUTPUT_PATH)
    SET (VTK_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/vtk)
  ELSE (EXECUTABLE_OUTPUT_PATH)
    SET (VTK_EXECUTABLE ${VTK_BINARY_DIR}/Wrapping/Tcl/${CMAKE_CFG_INTDIR}/vtk)
  ENDIF (EXECUTABLE_OUTPUT_PATH)
ENDIF (VTK_WRAP_TCL)

OPTION(VTK_WRAP_PYTHON "wrap classes into the Python interpreted language")
IF (VTK_WRAP_PYTHON)
  INCLUDE (${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
  FIND_FILE(VTK_WRAP_HINTS hints ${VTK_SOURCE_DIR}/Wrapping )
  UTILITY_SOURCE(VTK_WRAP_PYTHON_EXE vtkWrapPython Wrapping vtkWrapPython.c)
ENDIF (VTK_WRAP_PYTHON)

IF(BUILD_TESTING)
 IF (DART_ROOT)
  FIND_PROGRAM(PYTHON_EXECUTABLE NAMES python)
 ENDIF (DART_ROOT)
ENDIF(BUILD_TESTING)

OPTION(VTK_WRAP_JAVA "wrap classes into the Java language")
IF (VTK_WRAP_JAVA)
  INCLUDE (${CMAKE_ROOT}/Modules/FindJNI.cmake)
  INCLUDE (${CMAKE_ROOT}/Modules/FindJNI.cmake)
  FIND_FILE(VTK_WRAP_HINTS hints ${VTK_SOURCE_DIR}/Wrapping )
  UTILITY_SOURCE(VTK_WRAP_JAVA_EXE vtkWrapJava Wrapping vtkWrapJava.c)
  UTILITY_SOURCE(VTK_PARSE_JAVA_EXE vtkParseJava Wrapping vtkParseJava.c)
  # where to write the resulting .java files
  IF (NOT VTK_JAVA_HOME)
    SET (VTK_JAVA_HOME . CACHE PATH "Path to Java install")
  ENDIF (NOT VTK_JAVA_HOME)
ENDIF (VTK_WRAP_JAVA)

OPTION(VTK_USE_ANSI_STDLIB "Use the ANSI standard iostream library", OFF)

#
# try to find the data files for VTKData
#
FIND_PATH(VTK_DATA_ROOT VTKData.readme ${VTK_SOURCE_DIR}/../VTKData)

# where will executable tests be written ?<commit_msg>ENH: Check VTK_DATA_ROOT environment variable as well as various paths<commit_after>PROJECT(VTK)
OPTION(BUILD_SHARED_LIBS "Build VTK with shared libraries." OFF)
OPTION(BUILD_EXAMPLES "Build VTK examples." OFF)
OPTION(VTK_USE_64BIT_IDS "Build VTK with 64 bit ids" OFF)

SUBDIRS(Wrapping Utilities Common Filtering Imaging Graphics IO)

SUBDIR_DEPENDS(Common Wrapping Utilities)
SUBDIR_DEPENDS(Filtering Common)
SUBDIR_DEPENDS(Imaging Filtering)
SUBDIR_DEPENDS(Graphics Filtering)
SUBDIR_DEPENDS(IO Filtering)

SET (LIBRARY_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all executables.")

SET (VTK_BINARY_PATH ${LIBRARY_OUTPUT_PATH} CACHE INTERNAL "Single output directory for building all libraries.")
SET (VTK_LIBRARY_PATH ${EXECUTABLE_OUTPUT_PATH} CACHE INTERNAL "Single output directory for building all executables.")

OPTION (VTK_USE_RENDERING "Build the rendering classes used for displaying" ON)
OPTION (VTK_DEBUG_LEAKS "Build leak checking support into vtk." OFF)
OPTION (VTK_USE_HYBRID "Build the hybrid directory classes")
OPTION (VTK_USE_PATENTED "Build the patented directory classes, these classes are patented and may require a license to use")
#ifdef __APPLE__
OPTION (VTK_USE_QUARTZ "Build classes for the Quartz window manager" OFF)
#endif
IF (CMAKE_HAS_X)
  OPTION(VTK_USE_X "Build classes for the X11 window manager" ON)
ENDIF (CMAKE_HAS_X)

OPTION (VTK_USE_PARALLEL "Build the parallel directory classes")
IF (VTK_USE_PARALLEL)
    OPTION (VTK_USE_MPI 
      "use MPI (Message Passing Interface) library for parallel support")
    IF(BUILD_TESTING)
     IF (DART_ROOT)
      IF (VTK_USE_MPI)
        FIND_PROGRAM(MPIRUN NAMES mpirun lamexec)
        SET (MPI_PREFLAGS "-np 2" CACHE STRING " Flags used by mpi start program.")
        SET (MPI_POSTFLAGS "" CACHE STRING " Flags used by mpi start program.")
      ENDIF (VTK_USE_MPI)
     ENDIF (DART_ROOT)
    ENDIF(BUILD_TESTING)
ENDIF (VTK_USE_PARALLEL)

OPTION (VTK_MANGLE_MESA "Use mangled Mesa with OpenGL" OFF)
IF (VTK_MANGLE_MESA)
  FIND_LIBRARY(MESA_LIBRARY MesaGL
  /usr/local/lib 
  )
  FIND_LIBRARY(MESA_OS_LIBRARY MesaOS
  /usr/local/lib 
  )
ENDIF (VTK_MANGLE_MESA)

OPTION(VTK_WRAP_TCL "wrap classes into the TCL intepreted language")
IF (VTK_WRAP_TCL)
  INCLUDE (${CMAKE_ROOT}/Modules/FindTCL.cmake)
  UTILITY_SOURCE(VTK_WRAP_TCL_EXE vtkWrapTcl Wrapping vtkWrapTcl.c)
  FIND_FILE(VTK_WRAP_HINTS hints ${VTK_SOURCE_DIR}/Wrapping )
  IF (EXECUTABLE_OUTPUT_PATH)
    SET (VTK_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/vtk)
  ELSE (EXECUTABLE_OUTPUT_PATH)
    SET (VTK_EXECUTABLE ${VTK_BINARY_DIR}/Wrapping/Tcl/${CMAKE_CFG_INTDIR}/vtk)
  ENDIF (EXECUTABLE_OUTPUT_PATH)
ENDIF (VTK_WRAP_TCL)

OPTION(VTK_WRAP_PYTHON "wrap classes into the Python interpreted language")
IF (VTK_WRAP_PYTHON)
  INCLUDE (${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
  FIND_FILE(VTK_WRAP_HINTS hints ${VTK_SOURCE_DIR}/Wrapping )
  UTILITY_SOURCE(VTK_WRAP_PYTHON_EXE vtkWrapPython Wrapping vtkWrapPython.c)
ENDIF (VTK_WRAP_PYTHON)

IF(BUILD_TESTING)
 IF (DART_ROOT)
  FIND_PROGRAM(PYTHON_EXECUTABLE NAMES python)
 ENDIF (DART_ROOT)
ENDIF(BUILD_TESTING)

OPTION(VTK_WRAP_JAVA "wrap classes into the Java language")
IF (VTK_WRAP_JAVA)
  INCLUDE (${CMAKE_ROOT}/Modules/FindJNI.cmake)
  INCLUDE (${CMAKE_ROOT}/Modules/FindJNI.cmake)
  FIND_FILE(VTK_WRAP_HINTS hints ${VTK_SOURCE_DIR}/Wrapping )
  UTILITY_SOURCE(VTK_WRAP_JAVA_EXE vtkWrapJava Wrapping vtkWrapJava.c)
  UTILITY_SOURCE(VTK_PARSE_JAVA_EXE vtkParseJava Wrapping vtkParseJava.c)
  # where to write the resulting .java files
  IF (NOT VTK_JAVA_HOME)
    SET (VTK_JAVA_HOME . CACHE PATH "Path to Java install")
  ENDIF (NOT VTK_JAVA_HOME)
ENDIF (VTK_WRAP_JAVA)

OPTION(VTK_USE_ANSI_STDLIB "Use the ANSI standard iostream library", OFF)

#
# try to find the data files for VTKData
#
FIND_PATH(VTK_DATA_ROOT VTKData.readme ${VTK_SOURCE_DIR}/../VTKData $ENV{VTK_DATA_ROOT})

# where will executable tests be written ?
{'fraction_non_alphanumeric': 0.07754242536851233, 'fraction_numerical': 0.0017341756472191254, 'mean_word_length': 5.918594687232219, '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': '7268813', 'n_tokens_mistral': 3188, 'n_tokens_neox': 3105, 'n_words': 746}