<commit_before>cmake_minimum_required(VERSION 3.5)
project(array_view)

option(BUILD_TESTS "Build unit tests. Requires GTest." ON)
option(BUILD_GTEST "Build GTest along with this project (ON) or use an existing installation (OFF)." ON)

# An interface target for array_view
add_library(array_view INTERFACE)
add_library(array_view::array_view ALIAS array_view)

target_include_directories(array_view INTERFACE .)
target_compile_features(array_view INTERFACE cxx_std_14)

# Export target, importable from build directory
export(TARGETS array_view
	NAMESPACE array_view::
	FILE array_viewConfig.cmake
)

if(BUILD_TESTS)

	add_executable(av_test "array_view/array_view_test.cpp")
	target_link_libraries(av_test array_view::array_view )

	if(BUILD_GTEST)
		set(GTEST_ROOT $ENV{GTEST_ROOT} CACHE PATH "Path to GTest directory")
		if("${GTEST_ROOT}" STREQUAL "")
    		message(FATAL_ERROR "GTEST_ROOT unspecified. Set GTEST_ROOT to point to your GTest directory.")
		endif()

		file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/gtest")
		add_subdirectory("${GTEST_ROOT}" "${CMAKE_BINARY_DIR}/gtest")
		include_directories("${GTEST_ROOT}/include")
		target_link_libraries(av_test gtest gtest_main pthread)
	else()
		find_package(GTest REQUIRED)
		target_link_libraries(av_test GTest::GTest GTest::Main)
	endif()

endif()<commit_msg>Scope CMake options AV_ to differentiate when included from another CMake project<commit_after>cmake_minimum_required(VERSION 3.5)
project(array_view)

option(AV_BUILD_TESTS "Build unit tests. Requires GTest." ON)
option(AV_BUILD_GTEST "Build GTest along with this project (ON) or use an existing installation (OFF)." ON)

# An interface target for array_view
add_library(array_view INTERFACE)
add_library(array_view::array_view ALIAS array_view)

target_include_directories(array_view INTERFACE .)
target_compile_features(array_view INTERFACE cxx_std_14)

# Export target, importable from build directory
export(TARGETS array_view
	NAMESPACE array_view::
	FILE array_viewConfig.cmake
)

if(AV_BUILD_TESTS)

	add_executable(av_test "array_view/array_view_test.cpp")
	target_link_libraries(av_test array_view::array_view )

	if(AV_BUILD_GTEST)
		set(GTEST_ROOT $ENV{GTEST_ROOT} CACHE PATH "Path to GTest directory")
		if("${GTEST_ROOT}" STREQUAL "")
    		message(FATAL_ERROR "To build GTest, set GTEST_ROOT to point to your GTest folder, "
    			                "or disable building with this project.")
		endif()

		file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/gtest")
		add_subdirectory("${GTEST_ROOT}" "${CMAKE_BINARY_DIR}/gtest")
		include_directories("${GTEST_ROOT}/include")
		target_link_libraries(av_test gtest gtest_main pthread)
	else()
		find_package(GTest REQUIRED)
		target_link_libraries(av_test GTest::GTest GTest::Main)
	endif()

endif()
{'fraction_non_alphanumeric': 0.09146782357194505, 'fraction_numerical': 0.0028922631959508315, 'mean_word_length': 6.860795454545454, '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': '3984178', 'n_tokens_mistral': 997, 'n_tokens_neox': 940, 'n_words': 211}