<commit_before>cmake_minimum_required(VERSION 3.0)

# Set the project version to the vulkan header version.
file(STRINGS volk.h matched_line REGEX "#define[ \t]+VOLK_HEADER_VERSION" LIMIT_INPUT 1000)
string(REGEX MATCH "([0-9\\.]+)$" parsed_version ${matched_line})
if(NOT parsed_version)
  message(FATAL_ERROR "Failed to parse VOLK_HEADER_VERSION!")
endif()

project(volk VERSION ${parsed_version} LANGUAGES C)

find_package(Vulkan REQUIRED)

add_library(volk STATIC volk.c volk.h)
target_include_directories(volk PUBLIC 
  $<INSTALL_INTERFACE:include>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

if(MSVC)
  target_compile_options(volk PRIVATE /W4 /WX)
else()
  target_compile_options(volk PRIVATE -Wall -Wextra -Werror)
  target_link_libraries(volk PRIVATE dl)
endif()

find_package(Vulkan)
if(TARGET Vulkan::Vulkan) 
  target_link_libraries(volk PUBLIC Vulkan::Vulkan)
elseif(DEFINED ENV{VULKAN_SDK})
	target_include_directories(volk PUBLIC "$ENV{VULKAN_SDK}/include")
endif()

# Installation

include(GNUInstallDirs)
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/volk)
<commit_msg>Removed non-optional FindVulkan module call.<commit_after>cmake_minimum_required(VERSION 3.0)

# Set the project version to the vulkan header version.
file(STRINGS volk.h matched_line REGEX "#define[ \t]+VOLK_HEADER_VERSION" LIMIT_INPUT 1000)
string(REGEX MATCH "([0-9\\.]+)$" parsed_version ${matched_line})
if(NOT parsed_version)
  message(FATAL_ERROR "Failed to parse VOLK_HEADER_VERSION!")
endif()

project(volk VERSION ${parsed_version} LANGUAGES C)

add_library(volk STATIC volk.c volk.h)
target_include_directories(volk PUBLIC 
  $<INSTALL_INTERFACE:include>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

if(MSVC)
  target_compile_options(volk PRIVATE /W4 /WX)
else()
  target_compile_options(volk PRIVATE -Wall -Wextra -Werror)
  target_link_libraries(volk PRIVATE dl)
endif()

find_package(Vulkan)
if(TARGET Vulkan::Vulkan) 
  target_link_libraries(volk PUBLIC Vulkan::Vulkan)
elseif(DEFINED ENV{VULKAN_SDK})
	target_include_directories(volk PUBLIC "$ENV{VULKAN_SDK}/include")
endif()

# Installation

include(GNUInstallDirs)
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/volk)

{'fraction_non_alphanumeric': 0.10828025477707007, 'fraction_numerical': 0.00818926296633303, 'mean_word_length': 7.726190476190476, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2074846', 'n_tokens_mistral': 867, 'n_tokens_neox': 817, 'n_words': 158}