<commit_before>project(libshaderc)

# Even though shaderc.hpp is a headers-only library, adding
# a dependency here will force clients of the library to rebuild
# when it changes.
add_library(shaderc STATIC
  include/shaderc/shaderc.h
  include/shaderc/shaderc.hpp
  src/shaderc.cc
  src/shaderc_private.h
)

shaderc_default_compile_options(shaderc)
target_include_directories(shaderc PUBLIC include PRIVATE ${glslang_SOURCE_DIR})

install(TARGETS shaderc
  LIBRARY DESTINATION lib
  ARCHIVE DESTINATION lib)

find_package(Threads)
target_link_libraries(shaderc PRIVATE
  glslang OSDependent OGLCompiler glslang ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(shaderc PRIVATE shaderc_util)
target_link_libraries(shaderc PRIVATE SPIRV)  # from glslang
target_link_libraries(shaderc PRIVATE SPIRV-Tools)


shaderc_add_tests(<commit_msg>Install shaderc header files.<commit_after>project(libshaderc)

# Even though shaderc.hpp is a headers-only library, adding
# a dependency here will force clients of the library to rebuild
# when it changes.
add_library(shaderc STATIC
  include/shaderc/shaderc.h
  include/shaderc/shaderc.hpp
  src/shaderc.cc
  src/shaderc_private.h
)

shaderc_default_compile_options(shaderc)
target_include_directories(shaderc PUBLIC include PRIVATE ${glslang_SOURCE_DIR})

install(
  FILES
    include/shaderc/shaderc.h
    include/shaderc/shaderc.hpp
  DESTINATION
    include/shaderc)

install(TARGETS shaderc
  LIBRARY DESTINATION lib
  ARCHIVE DESTINATION lib)

find_package(Threads)
target_link_libraries(shaderc PRIVATE
  glslang OSDependent OGLCompiler glslang ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(shaderc PRIVATE shaderc_util)
target_link_libraries(shaderc PRIVATE SPIRV)  # from glslang
target_link_libraries(shaderc PRIVATE SPIRV-Tools)


shaderc_add_tests(
{'fraction_non_alphanumeric': 0.059966685174902834, 'fraction_numerical': 0.0, 'mean_word_length': 6.539748953974895, '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': '2068136', 'n_tokens_mistral': 670, 'n_tokens_neox': 643, 'n_words': 134}