<commit_before>cmake_minimum_required(VERSION 2.8)
project(Utilities)

set(util_sources Cryptography.cpp DataStream.cpp Misc.cpp
	Semaphore.cpp Socket.cpp TCPConnection.cpp TCPServer.cpp
	WebSocketConnection.cpp SQLDatabase.cpp RequestServer.cpp)

file(GLOB util_headers *.h)

add_library(Utilities STATIC ${util_sources})
add_library(Utilities SHARED ${util_sources})

set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -pedantic -Wno-overloaded-virtual ${CMAKE_CXX_FLAGS}")

find_package(Threads REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(PostgreSQL REQUIRED)

target_link_libraries(Utilities ${CMAKE_THREAD_LIBS_INIT}
	${OPENSSL_LIBRARIES} ${PostgreSQL_LIBRARIES})

include_directories(${PostgreSQL_INCLUDE_DIRS})

if(NOT WIN32)
	target_link_libraries(Utilities rt)
	install(FILES ${util_headers} DESTINATION include/Utilities)
	install(FILES ${CMAKE_BINARY_DIR}/libUtilities.a DESTINATION lib)
	install(FILES ${CMAKE_BINARY_DIR}/libUtilities.so DESTINATION lib)
endif()<commit_msg>Update CMakeLists to clang<commit_after># vim: tw=1000
cmake_minimum_required(VERSION 2.8.8)
project(Utilities)

set(util_sources Cryptography.cpp DataStream.cpp Misc.cpp
	Semaphore.cpp Socket.cpp TCPConnection.cpp TCPServer.cpp
	WebSocketConnection.cpp SQLDatabase.cpp RequestServer.cpp)

file(GLOB util_headers *.h)

add_library(UtilitiesObjects OBJECT ${util_sources})
add_library(Utilities SHARED $<TARGET_OBJECTS:UtilitiesObjects>)
add_library(UtilitiesStatic STATIC $<TARGET_OBJECTS:UtilitiesObjects>)

# requires clang
set(CMAKE_CXX_FLAGS "-std=c++11 -fPIC -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded -Wno-cast-align -Wno-exit-time-destructors -Wno-global-constructors ${CMAKE_CXX_FLAGS}")

find_package(Threads REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(PostgreSQL REQUIRED)

target_link_libraries(Utilities ${CMAKE_THREAD_LIBS_INIT}
	${OPENSSL_LIBRARIES} ${PostgreSQL_LIBRARIES})

include_directories(${PostgreSQL_INCLUDE_DIRS})

if(NOT WIN32)
	target_link_libraries(Utilities rt)
	set_target_properties(UtilitiesStatic PROPERTIES OUTPUT_NAME Utilities)
	install(FILES ${util_headers} DESTINATION include/Utilities)
	install(FILES ${CMAKE_BINARY_DIR}/libUtilities.a DESTINATION lib)
	install(FILES ${CMAKE_BINARY_DIR}/libUtilities.so DESTINATION lib)
endif()
{'fraction_non_alphanumeric': 0.10065359477124183, 'fraction_numerical': 0.009150326797385621, 'mean_word_length': 8.982608695652173, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5595829', 'n_tokens_mistral': 844, 'n_tokens_neox': 811, 'n_words': 134}