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

include(FindXercesC)
find_package(XercesC REQUIRED)
include_directories( ${XercesC_INCLUDE_DIR}
						src/main/cpp
					)


file(GLOB_RECURSE SRC_FILES src/main/cpp/*.cpp src/main/cpp/*.h )
add_library(${PROJECT_NAME} ${SRC_FILES})
#if(BUILD_SHARED_LIBS)
#    install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib)
#else()
#    install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib)
#endif()
install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 98)



target_link_libraries ( ${PROJECT_NAME} ${XercesC_LIBRARY} )

foreach(source IN LISTS SRC_FILES)
	file(RELATIVE_PATH rel_source ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/com/ ${source})
    get_filename_component(source_path ${rel_source} DIRECTORY)
    string(REPLACE "\\" "/" source_path_msvc "${source_path}")
    source_group("${source_path_msvc}" FILES "${source}")
endforeach()



#unit tests

enable_testing()

file( GLOB_RECURSE UNIT_TESTS src/test/cpp/*.cpp )
file(COPY "src/test/resources" DESTINATION "${CMAKE_BINARY_DIR}")<commit_msg>Removed if else library installation. simply added:<commit_after>cmake_minimum_required (VERSION 3.5)
project (regxmllibc)

include(FindXercesC)
find_package(XercesC REQUIRED)
include_directories( ${XercesC_INCLUDE_DIR}
						src/main/cpp
					)


file(GLOB_RECURSE SRC_FILES src/main/cpp/*.cpp src/main/cpp/*.h )
add_library(${PROJECT_NAME} ${SRC_FILES})
install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 98)



target_link_libraries ( ${PROJECT_NAME} ${XercesC_LIBRARY} )

foreach(source IN LISTS SRC_FILES)
	file(RELATIVE_PATH rel_source ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/com/ ${source})
    get_filename_component(source_path ${rel_source} DIRECTORY)
    string(REPLACE "\\" "/" source_path_msvc "${source_path}")
    source_group("${source_path_msvc}" FILES "${source}")
endforeach()



#unit tests

enable_testing()

file( GLOB_RECURSE UNIT_TESTS src/test/cpp/*.cpp )
file(COPY "src/test/resources" DESTINATION "${CMAKE_BINARY_DIR}")
{'fraction_non_alphanumeric': 0.12522768670309653, 'fraction_numerical': 0.0036429872495446266, 'mean_word_length': 6.655052264808362, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '2232418', 'n_tokens_mistral': 880, 'n_tokens_neox': 818, 'n_words': 142}