<commit_before>cmake_minimum_required(VERSION 3.6)

option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
set(LIB_TYPE STATIC)
if(BUILD_SHARED_LIBS)
  set(LIB_TYPE SHARED)
endif(BUILD_SHARED_LIBS)

set(CMAKE_CXX_STANDARD 11)

project(yaml_parser)

file(GLOB HEADER "include/*.hpp")
file(GLOB SRC src/*.cpp)

include_directories(include/)
find_path(YAML_CPP_INCLUDE yaml-cpp/yaml.h)
include_directories(${YAML_CPP_INCLUDE})

add_library(yaml_parser ${LIB_TYPE} ${SRC})

# Test
enable_testing()
add_executable(test1 test/test1.cpp)
find_library(YAML_CPP_LIB yaml-cpp)
target_link_libraries(test1 yaml_parser ${YAML_CPP_LIB})
add_test(NAME test1 COMMAND test1)

# Install
set_target_properties(
	yaml_parser
	PROPERTIES
	PUBLIC_HEADER "${HEADER}"
)
install(
	TARGETS yaml_parser
	LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
	ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
	PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include
)
<commit_msg>Fix linking problem<commit_after>cmake_minimum_required(VERSION 3.6)

option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
set(LIB_TYPE STATIC)
if(BUILD_SHARED_LIBS)
  set(LIB_TYPE SHARED)
endif(BUILD_SHARED_LIBS)

set(CMAKE_CXX_STANDARD 11)

project(yaml_parser)

file(GLOB HEADER "include/*.hpp")
file(GLOB SRC src/*.cpp)

include_directories(include/)
find_path(YAML_CPP_INCLUDE yaml-cpp/yaml.h)
include_directories(${YAML_CPP_INCLUDE})

find_library(YAML_CPP_LIB yaml-cpp)

add_library(yaml_parser ${LIB_TYPE} ${SRC})
target_link_libraries(yaml_parser ${YAML_CPP_LIB})

# Test
enable_testing()
add_executable(test1 test/test1.cpp)
target_link_libraries(test1 yaml_parser ${YAML_CPP_LIB})
add_test(NAME test1 COMMAND test1)

# Install
set_target_properties(
	yaml_parser
	PROPERTIES
	PUBLIC_HEADER "${HEADER}"
)
install(
	TARGETS yaml_parser
	LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
	ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
	RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
	PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include
)

{'fraction_non_alphanumeric': 0.0983524712930604, 'fraction_numerical': 0.008986520219670495, 'mean_word_length': 8.87192118226601, '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': '7506273', 'n_tokens_mistral': 826, 'n_tokens_neox': 755, 'n_words': 127}