<commit_before>set(proj OSSIM)

if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)

message(STATUS "Setup Ossim...")

# OSGeo4W provides an "ossim" package : use it otherwise if it is installed and not used by OTB
# we get conflicts (because OSGeo4W include dir is included for other dependencies
#if(WIN32)
#  set(DEFAULT_USE_SYSTEM_OSSIM  ON)
#endif()

if(USE_SYSTEM_OSSIM)
  find_package ( Ossim )
  message(STATUS "  Using OSSIM system version")
else()
  SETUP_SUPERBUILD(PROJECT ${proj})
  message(STATUS "  Using OSSIM SuperBuild version")

  # declare dependencies
  ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} TIFF GEOTIFF GEOS JPEG OPENTHREADS FREETYPE)

  INCLUDE_SUPERBUILD_DEPENDENCIES(${${proj}_DEPENDENCIES})
  # set proj back to its original value
  set(proj OSSIM)

  ADD_SUPERBUILD_CMAKE_VAR(TIFF_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(TIFF_LIBRARY)
  ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF_LIBRARY)
  ADD_SUPERBUILD_CMAKE_VAR(GEOS_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(GEOS_LIBRARY)
  ADD_SUPERBUILD_CMAKE_VAR(JPEG_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(JPEG_LIBRARY)
  ADD_SUPERBUILD_CMAKE_VAR(OPENTHREADS_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(OPENTHREADS_LIBRARY)
  ADD_SUPERBUILD_CMAKE_VAR(FREETYPE_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(FREETYPE_LIBRARY)

  set(OSSIM_CXX_FLAGS  -D__STDC_CONSTANT_MACROS)

  if(MSVC)
    set(OSSIM_CXX_FLAGS /EHsc)
    list(APPEND OSSIM_SB_CONFIG "-GNMake\ Makefiles")
  endif()

  # archive version
  ExternalProject_Add(${proj}
    PREFIX ${proj}
    URL "https://www.orfeo-toolbox.org/packages/ossim-minimal-r23537.tar.gz"
    URL_MD5 40f406c0da9cc188092582b3bdb20a80
    BINARY_DIR ${OSSIM_SB_BUILD_DIR}
    INSTALL_DIR ${SB_INSTALL_PREFIX}
    DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
    CMAKE_CACHE_ARGS
    -DProject_WC_REVISION:STRING=23537
    -DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
    -DCMAKE_BUILD_TYPE:STRING=Release
    -DCMAKE_CXX_FLAGS:STRING=${OSSIM_CXX_FLAGS}
    -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
    -DBUILD_OSSIM_FREETYPE_SUPPORT:BOOL=ON
    -DBUILD_OSSIM_APPS:BOOL=OFF
    -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
    -DINSTALL_ARCHIVE_DIR:STRING=lib
    -DINSTALL_LIBRARY_DIR:STRING=lib
    -DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX}
    ${OSSIM_SB_CONFIG}
    DEPENDS ${${proj}_DEPENDENCIES}
    CONFIGURE_COMMAND ${SB_CMAKE_COMMAND} ${OSSIM_SB_SRC}/ossim
    )

  set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
  if(WIN32)
    set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/ossim.lib)
  elseif(UNIX)
    set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/libossim${CMAKE_SHARED_LIBRARY_SUFFIX})
  endif()

endif()

endif()<commit_msg>fix ossim configure command and md5sum<commit_after>set(proj OSSIM)

if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)

message(STATUS "Setup Ossim...")

# OSGeo4W provides an "ossim" package : use it otherwise if it is installed and not used by OTB
# we get conflicts (because OSGeo4W include dir is included for other dependencies
#if(WIN32)
#  set(DEFAULT_USE_SYSTEM_OSSIM  ON)
#endif()

if(USE_SYSTEM_OSSIM)
  find_package ( Ossim )
  message(STATUS "  Using OSSIM system version")
else()
  SETUP_SUPERBUILD(PROJECT ${proj})
  message(STATUS "  Using OSSIM SuperBuild version")

  # declare dependencies
  ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} TIFF GEOTIFF GEOS JPEG OPENTHREADS FREETYPE)

  INCLUDE_SUPERBUILD_DEPENDENCIES(${${proj}_DEPENDENCIES})
  # set proj back to its original value
  set(proj OSSIM)

  ADD_SUPERBUILD_CMAKE_VAR(TIFF_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(TIFF_LIBRARY)
  ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF_LIBRARY)
  ADD_SUPERBUILD_CMAKE_VAR(GEOS_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(GEOS_LIBRARY)
  ADD_SUPERBUILD_CMAKE_VAR(JPEG_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(JPEG_LIBRARY)
  ADD_SUPERBUILD_CMAKE_VAR(OPENTHREADS_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(OPENTHREADS_LIBRARY)
  ADD_SUPERBUILD_CMAKE_VAR(FREETYPE_INCLUDE_DIR)
  ADD_SUPERBUILD_CMAKE_VAR(FREETYPE_LIBRARY)

  set(OSSIM_CXX_FLAGS  -D__STDC_CONSTANT_MACROS)

  if(MSVC)
    set(OSSIM_CXX_FLAGS /EHsc)
    list(APPEND OSSIM_SB_CONFIG "-GNMake\ Makefiles")
  endif()

  # archive version
  ExternalProject_Add(${proj}
    PREFIX ${proj}
    URL "https://www.orfeo-toolbox.org/packages/ossim-minimal-r23537.tar.gz"
    URL_MD5 f77d574ab2817bcc36633f77824facb5
    BINARY_DIR ${OSSIM_SB_BUILD_DIR}
    INSTALL_DIR ${SB_INSTALL_PREFIX}
    DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
    CMAKE_CACHE_ARGS
    -DProject_WC_REVISION:STRING=23537
    -DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
    -DCMAKE_BUILD_TYPE:STRING=Release
    -DCMAKE_CXX_FLAGS:STRING=${OSSIM_CXX_FLAGS}
    -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
    -DBUILD_OSSIM_FREETYPE_SUPPORT:BOOL=ON
    -DBUILD_OSSIM_APPS:BOOL=OFF
    -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
    -DINSTALL_ARCHIVE_DIR:STRING=lib
    -DINSTALL_LIBRARY_DIR:STRING=lib
    -DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX}
    ${OSSIM_SB_CONFIG}
    DEPENDS ${${proj}_DEPENDENCIES}
    CMAKE_COMMAND ${SB_CMAKE_COMMAND}
    )


  set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
  if(WIN32)
    set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/ossim.lib)
  elseif(UNIX)
    set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/libossim${CMAKE_SHARED_LIBRARY_SUFFIX})
  endif()

endif()

endif()
{'fraction_non_alphanumeric': 0.09097688292319164, 'fraction_numerical': 0.0145413870246085, 'mean_word_length': 6.162883845126836, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '113179', 'n_tokens_mistral': 2385, 'n_tokens_neox': 2136, 'n_words': 289}