<commit_before>cmake_minimum_required(VERSION 3.9)

include(ExternalProject)
project(wave CXX)
include(CTest)

# build options
option(wave_enable_tests "Build Unit tests" ON)

# if cmake osx deployment target is defined, don't override the cxx standard
if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
  # use of c++14
  set(CMAKE_CXX_STANDARD 14)
endif()
if(wave_enable_tests)

  set(gtest_install_dir ${CMAKE_BINARY_DIR}/gtest-install)
  ExternalProject_Add(external_googletest
    GIT_REPOSITORY "https://github.com/google/googletest.git"
    GIT_TAG "718fd88d8f145c63b8cc134cf8fed92743cc112f"  # commit fixing visual studio 2017 errors
    UPDATE_COMMAND ""
    CMAKE_ARGS
      "-Dgtest_force_shared_crt=ON"
      "-DCMAKE_INSTALL_PREFIX=${gtest_install_dir}"
  )
  link_directories("${gtest_install_dir}/lib")
  set(GTEST_ROOT "${gtest_install_dir}" CACHE PATH "Path to googletest")

  # download test resource from https://archive.org/details/test_wav
  set(test_resource_path "${CMAKE_BINARY_DIR}/test_resource")
  file(MAKE_DIRECTORY "${test_resource_path}")
  file(DOWNLOAD "https://archive.org/download/test_wav/Untitled3.wav" "${test_resource_path}/Untitled3.wav")
  file(DOWNLOAD "https://s3.amazonaws.com/audionamix-public/fireworks.wav" "${test_resource_path}/extra-header.wav")
  # Download wikipedia's different format wave https://en.wikipedia.org/wiki/WAV
  set(test_file_list<commit_msg>Add the d postfix to built library to avoid overriding when changing configuration<commit_after>cmake_minimum_required(VERSION 3.9)

include(ExternalProject)
project(wave CXX)
include(CTest)

# build options
option(wave_enable_tests "Build Unit tests" ON)

# if cmake osx deployment target is defined, don't override the cxx standard
if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
  # use of c++14
  set(CMAKE_CXX_STANDARD 14)
endif()
set(CMAKE_DEBUG_POSTFIX d)  # add the d postfix to generated libraries

if(wave_enable_tests)
  set(gtest_install_dir ${CMAKE_BINARY_DIR}/gtest-install)
  ExternalProject_Add(external_googletest
    GIT_REPOSITORY "https://github.com/google/googletest.git"
    GIT_TAG "718fd88d8f145c63b8cc134cf8fed92743cc112f"  # commit fixing visual studio 2017 errors
    UPDATE_COMMAND ""
    CMAKE_ARGS
      "-Dgtest_force_shared_crt=ON"
      "-DCMAKE_INSTALL_PREFIX=${gtest_install_dir}"
  )
  link_directories("${gtest_install_dir}/lib")
  set(GTEST_ROOT "${gtest_install_dir}" CACHE PATH "Path to googletest")

  # download test resource from https://archive.org/details/test_wav
  set(test_resource_path "${CMAKE_BINARY_DIR}/test_resource")
  file(MAKE_DIRECTORY "${test_resource_path}")
  file(DOWNLOAD "https://archive.org/download/test_wav/Untitled3.wav" "${test_resource_path}/Untitled3.wav")
  file(DOWNLOAD "https://s3.amazonaws.com/audionamix-public/fireworks.wav" "${test_resource_path}/extra-header.wav")
  # Download wikipedia's different format wave https://en.wikipedia.org/wiki/WAV
  set(test_file_list
{'fraction_non_alphanumeric': 0.10614334470989761, 'fraction_numerical': 0.025255972696245733, 'mean_word_length': 6.079710144927536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6459565', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1026, 'n_words': 184}