<commit_before>#####
##
## Copyright (C) 2012, 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
## <TODO: Full License information>
## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
## version of the LGPL license.
##
## Author: <NAME> <<EMAIL>>
##
#####

#
# Try to find the NETCDF C and C++ libraries
#
# This module exports
#
#   NETCDF_LIBRARIES
#   NETCDF_INCLUDE_DIRS
#

INCLUDE(FindPackageHandleStandardArgs)

SET_IF_EMPTY(NETCDF_DIR "$ENV{NETCDF_DIR}")

FIND_PATH(NETCDF_INCLUDE_DIR netcdf.hh
  HINTS
    ${NETCDF_DIR}
  PATH_SUFFIXES
    netcdf include
  )

#
# TODO:
#
# - netcdf might externally depend on hdf5. Check and fix this.
# - separate C++ and C library search
#

FIND_LIBRARY(NETCDF_CPLUSPLUS_LIBRARY NAMES netcdf_c++ netcdf_cpp netcdf_c++4
  HINTS
    ${NETCDF_DIR}
  PATH_SUFFIXES
    lib${LIB_SUFFIX} lib64 lib
  )

FIND_LIBRARY(NETCDF_C_LIBRARY NAMES netcdf
  HINTS
    ${NETCDF_DIR}
  PATH_SUFFIXES
    lib${LIB_SUFFIX} lib64 lib
  )

SET(_output ${NETCDF_CPLUSPLUS_LIBRARY} ${NETCDF_C_LIBRARY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETCDF DEFAULT_MSG
  _output # Cosmetic: Gives nice output
  NETCDF_CPLUSPLUS_LIBRARY
  NETCDF_C_LIBRARY
  NETCDF_INCLUDE_DIR
  )

IF(NETCDF_FOUND)
  SET(NETCDF_INCLUDE_DIRS
    ${NETCDF_INCLUDE_DIR}
    )
  SET(NETCDF_LIBRARIES
    ${NETCDF_CPLUSPLUS_LIBRARY}
    ${NETCDF_C_LIBRARY}
    )
<commit_msg>Well, no. We don't support libnetcdf_c++4. Major porting required<commit_after>#####
##
## Copyright (C) 2012, 2013 by the deal.II authors
##
## This file is part of the deal.II library.
##
## <TODO: Full License information>
## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
## version of the LGPL license.
##
## Author: <NAME> <<EMAIL>>
##
#####

#
# Try to find the NETCDF C and C++ libraries
#
# This module exports
#
#   NETCDF_LIBRARIES
#   NETCDF_INCLUDE_DIRS
#

INCLUDE(FindPackageHandleStandardArgs)

SET_IF_EMPTY(NETCDF_DIR "$ENV{NETCDF_DIR}")

FIND_PATH(NETCDF_INCLUDE_DIR netcdfcpp.h
  HINTS
    ${NETCDF_DIR}
  PATH_SUFFIXES
    netcdf include
  )

#
# TODO:
#
# - netcdf might externally depend on hdf5. Check and fix this.
# - separate C++ and C library search
#

FIND_LIBRARY(NETCDF_CPLUSPLUS_LIBRARY NAMES netcdf_c++ netcdf_cpp
  HINTS
    ${NETCDF_DIR}
  PATH_SUFFIXES
    lib${LIB_SUFFIX} lib64 lib
  )

FIND_LIBRARY(NETCDF_C_LIBRARY NAMES netcdf
  HINTS
    ${NETCDF_DIR}
  PATH_SUFFIXES
    lib${LIB_SUFFIX} lib64 lib
  )

SET(_output ${NETCDF_CPLUSPLUS_LIBRARY} ${NETCDF_C_LIBRARY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETCDF DEFAULT_MSG
  _output # Cosmetic: Gives nice output
  NETCDF_CPLUSPLUS_LIBRARY
  NETCDF_C_LIBRARY
  NETCDF_INCLUDE_DIR
  )

IF(NETCDF_FOUND)
  SET(NETCDF_INCLUDE_DIRS
    ${NETCDF_INCLUDE_DIR}
    )
  SET(NETCDF_LIBRARIES
    ${NETCDF_CPLUSPLUS_LIBRARY}
    ${NETCDF_C_LIBRARY}
    )

{'fraction_non_alphanumeric': 0.0986703988803359, 'fraction_numerical': 0.012596221133659902, 'mean_word_length': 4.435361216730038, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '395800', 'n_tokens_mistral': 1278, 'n_tokens_neox': 1192, 'n_words': 253}