<commit_before>set(TARGET sjparser)

set(SJPARSER_INCLUDES_DIR
  ${CMAKE_CURRENT_SOURCE_DIR}
)

set(SRCS
  sjparser/internals.cpp
  sjparser/parsing_error.cpp
  sjparser/yajl_parser.cpp
)

set(HDRS
  sjparser/sjparser.h
  sjparser/sjparser_impl.h
  sjparser/internals.h
  sjparser/internals_impl.h
  sjparser/parsing_error.h
  sjparser/yajl_parser.h
)

add_library(${TARGET} STATIC ${SRCS})

target_link_libraries(${TARGET} ${YAJL_LIB})
target_include_directories(${TARGET} PUBLIC ${SJPARSER_INCLUDES_DIR})

add_library(${TARGET}_shared SHARED ${SRCS})

target_link_libraries(${TARGET}_shared ${YAJL_LIB})
set_target_properties(${TARGET}_shared PROPERTIES OUTPUT_NAME ${TARGET})
target_include_directories(${TARGET}_shared PUBLIC ${SJPARSER_INCLUDES_DIR})

if(STANDALONE_BUILD)
  install(TARGETS ${TARGET} ${TARGET}_shared DESTINATION lib/sjparser)
  install(FILES ${HDRS} DESTINATION include/sjparser)

  set(SJPARSER_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

  add_subdirectory(check)
  add_subdirectory(documentation)

  if(CLANG_FORMAT_BIN)
    add_custom_target(format_library
      COMMAND ${CLANG_FORMAT_BIN} -i ${SRCS} ${HDRS}
      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    )
  endif()
endif()<commit_msg>Do not build separate shared library in submodule<commit_after>set(TARGET sjparser)

set(SJPARSER_INCLUDES_DIR
  ${CMAKE_CURRENT_SOURCE_DIR}
)

set(SRCS
  sjparser/internals.cpp
  sjparser/parsing_error.cpp
  sjparser/yajl_parser.cpp
)

set(HDRS
  sjparser/sjparser.h
  sjparser/sjparser_impl.h
  sjparser/internals.h
  sjparser/internals_impl.h
  sjparser/parsing_error.h
  sjparser/yajl_parser.h
)

add_library(${TARGET} STATIC ${SRCS})

target_link_libraries(${TARGET} ${YAJL_LIB})
target_include_directories(${TARGET} PUBLIC ${SJPARSER_INCLUDES_DIR})

if(STANDALONE_BUILD)
  add_library(${TARGET}_shared SHARED ${SRCS})

  target_link_libraries(${TARGET}_shared ${YAJL_LIB})
  set_target_properties(${TARGET}_shared PROPERTIES OUTPUT_NAME ${TARGET})
  target_include_directories(${TARGET}_shared PUBLIC ${SJPARSER_INCLUDES_DIR})

  install(TARGETS ${TARGET} ${TARGET}_shared DESTINATION lib/sjparser)
  install(FILES ${HDRS} DESTINATION include/sjparser)

  set(SJPARSER_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

  add_subdirectory(check)
  add_subdirectory(documentation)

  if(CLANG_FORMAT_BIN)
    add_custom_target(format_library
      COMMAND ${CLANG_FORMAT_BIN} -i ${SRCS} ${HDRS}
      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    )
  endif()
endif()
{'fraction_non_alphanumeric': 0.1086082059533387, 'fraction_numerical': 0.0, 'mean_word_length': 6.920382165605096, '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': '6850060', 'n_tokens_mistral': 979, 'n_tokens_neox': 960, 'n_words': 126}