<commit_before>include_directories(${PROJECT_BINARY_DIR}/include)

# Build the netcdf library.
set(NETCDF_LIBRARY "${PROJECT_BINARY_DIR}/lib/libnetcdf.a")
if (NOT EXISTS ${NETCDF_LIBRARY})
  message("Preparing netcdf...")
  execute_process(COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/netcdf ${CMAKE_CURRENT_BINARY_DIR}/netcdf
                  RESULT_VARIABLE stat)
  if (NOT stat EQUAL 0)
    message(FATAL_ERROR "Copying library source failed.")
  endif()

  message("Configuring netcdf library...")
  execute_process(COMMAND "${CMAKE_COMMAND}" -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DUSE_HDF5=ON -DHDF5_LIB=${POLYMEC_HDF5_LIBRARY} -DHDF5_HL_LIB=${POLYMEC_HDF5_HL_LIBRARY} -DHDF5_INCLUDE_DIR=${POLYMEC_HDF5_INCLUDE_DIR} -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DENABLE_DAP=OFF -DBUILD_SHARED_LIBS=OFF -DFIND_SHARED_LIBS=OFF -DENABLE_DYNAMIC_LOADING=ON -DENABLE_TESTS=OFF -DBUILD_UTILITIES=ON -DBUILD_EXAMPLES=OFF -DNC_HAVE_PARALLEL_HDF5=${POLYMEC_HAVE_MPI} -DHDF5_IS_PARALLEL=${POLYMEC_HAVE_MPI}
                  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/netcdf
                  OUTPUT_VARIABLE netcdf_config_log ERROR_VARIABLE netcdf_config_err
                  RESULT_VARIABLE stat)
  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/netcdf_config.log ${netcdf_config_log})
  if (NOT stat EQUAL 0)
    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/netcdf_config_errors.log ${netcdf_config_err})<commit_msg>Temporarily writing NetCDF config log.<commit_after>include_directories(${PROJECT_BINARY_DIR}/include)

# Build the netcdf library.
set(NETCDF_LIBRARY "${PROJECT_BINARY_DIR}/lib/libnetcdf.a")
if (NOT EXISTS ${NETCDF_LIBRARY})
  message("Preparing netcdf...")
  execute_process(COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/netcdf ${CMAKE_CURRENT_BINARY_DIR}/netcdf
                  RESULT_VARIABLE stat)
  if (NOT stat EQUAL 0)
    message(FATAL_ERROR "Copying library source failed.")
  endif()

  message("Configuring netcdf library...")
  execute_process(COMMAND "${CMAKE_COMMAND}" -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DUSE_HDF5=ON -DHDF5_LIB=${POLYMEC_HDF5_LIBRARY} -DHDF5_HL_LIB=${POLYMEC_HDF5_HL_LIBRARY} -DHDF5_INCLUDE_DIR=${POLYMEC_HDF5_INCLUDE_DIR} -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR} -DCMAKE_INSTALL_LIBDIR=lib -DENABLE_DAP=OFF -DBUILD_SHARED_LIBS=OFF -DFIND_SHARED_LIBS=OFF -DENABLE_DYNAMIC_LOADING=ON -DENABLE_TESTS=OFF -DBUILD_UTILITIES=ON -DBUILD_EXAMPLES=OFF -DNC_HAVE_PARALLEL_HDF5=${POLYMEC_HAVE_MPI} -DHDF5_IS_PARALLEL=${POLYMEC_HAVE_MPI}
                  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/netcdf
                  OUTPUT_VARIABLE netcdf_config_log ERROR_VARIABLE netcdf_config_err
                  RESULT_VARIABLE stat)
  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/netcdf_config.log ${netcdf_config_log})
  message(${netcdf_config_log})
  if (NOT stat EQUAL 0)
    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/netcdf_config_errors.log ${netcdf_config_err})
{'fraction_non_alphanumeric': 0.10154962083745467, 'fraction_numerical': 0.007253544345532476, 'mean_word_length': 6.138823529411765, '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': '6054635', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1181, 'n_words': 150}