<commit_before>
set(CMAKE_INCLUDE_CURRENT_DIR on)
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK)

include_directories(${FRAMEPROCESSOR_DIR}/include ${HDF5_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${LOG4CXX_INCLUDE_DIRS}/.. ${ZEROMQ_INCLUDE_DIRS})
add_definitions(${HDF5_DEFINITIONS})

file(GLOB APP_SOURCES DataBlock.cpp 
                      DataBlockPool.cpp 
                      FrameProcessorController.cpp 
                      FrameProcessorPlugin.cpp 
                      Frame.cpp 
                      IFrameCallback.cpp 
                      SharedMemoryController.cpp 
                      SharedMemoryParser.cpp 
                      SocketHandler.cpp )

file(GLOB TEST_SOURCES *Test*.cpp)

add_executable(frameProcessor ${APP_SOURCES} FrameProcessorApp.cpp)

message(STATUS "HDF5 include files:  " ${HDF5_INCLUDE_DIRS})
message(STATUS "HDF5 libs:           " ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES})
message(STATUS "HDF5 defs:           " ${HDF5_DEFINITIONS})

target_link_libraries(frameProcessor ${Boost_LIBRARIES} ${LOG4CXX_LIBRARIES} ${ZEROMQ_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES} ${COMMON_LIBRARY})

# Add library for dummy plugin
add_library(DummyPlugin SHARED DummyPlugin.cpp FrameProcessorPlugin.cpp IFrameCallback.cpp Frame.cpp DataBlock.cpp DataBlockPool.cpp)
target_link_libraries(DummyPlugin ${Boost_LIBRARIES} ${LOG4CXX_LIBRARIES} ${ZEROMQ_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES} ${COMMON_LIBRARY})

# Add library for HDF5 writer plugin
add_library(Hdf5Plugin SHARED FileWriterPlugin.cpp FrameProcessorPlugin.cpp IFrameCallback.cpp Frame.cpp DataBlock.cpp DataBlockPool.cpp)
target_link_libraries(Hdf5Plugin ${Boost_LIBRARIES} ${LOG4CXX_LIBRARIES} ${ZEROMQ_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES} ${COMMON_LIBRARY})

# Add library for excalibur plugin
add_library(ExcaliburReorderPlugin SHARED ExcaliburReorderPlugin.cpp FrameProcessorPlugin.cpp IFrameCallback.cpp Frame.cpp DataBlock.cpp DataBlockPool.cpp)
target_link_libraries(ExcaliburReorderPlugin ${Boost_LIBRARIES} ${LOG4CXX_LIBRARIES} ${ZEROMQ_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES} ${COMMON_LIBRARY})

# Add library for percival process plugin
add_library(PercivalProcessPlugin SHARED PercivalProcessPlugin.cpp FrameProcessorPlugin.cpp IFrameCallback.cpp Frame.cpp DataBlock.cpp DataBlockPool.cpp)
target_link_libraries(PercivalProcessPlugin ${Boost_LIBRARIES} ${LOG4CXX_LIBRARIES} ${ZEROMQ_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES} ${COMMON_LIBRARY})
            
# Add test and project source files to executable
file(GLOB TESTABLE_SOURCES DataBlock.cpp DataBlockPool.cpp IFrameCallback.cpp FrameProcessorPlugin.cpp Frame.cpp)
add_executable(frameProcessorTest ${TEST_SOURCES} ${TESTABLE_SOURCES})

# Define libraries to link against
target_link_libraries(frameProcessorTest 
        ${Boost_LIBRARIES}
        ${LOG4CXX_LIBRARIES}
        ${ZEROMQ_LIBRARIES}
        ${HDF5_LIBRARIES} 
        ${HDF5HL_LIBRARIES}
        Hdf5Plugin
        ${COMMON_LIBRARY}) 

if ( ${CMAKE_SYSTEM_NAME} MATCHES Linux )
  # librt required for timing functions
  find_library(REALTIME_LIBRARY 
	  	NAMES rt)
  target_link_libraries( frameProcessor ${REALTIME_LIBRARY} )
  target_link_libraries( frameProcessorTest ${REALTIME_LIBRARY} )
endif()
        <commit_msg>Creating library called FrameProcessor that can be used by external repos for plugins.<commit_after>
set(CMAKE_INCLUDE_CURRENT_DIR on)
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK)

include_directories(${FRAMEPROCESSOR_DIR}/include ${HDF5_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${LOG4CXX_INCLUDE_DIRS}/.. ${ZEROMQ_INCLUDE_DIRS})
add_definitions(${HDF5_DEFINITIONS})

file(GLOB LIB_SOURCES DataBlock.cpp 
                      DataBlockPool.cpp 
                      FrameProcessorPlugin.cpp 
                      Frame.cpp 
                      IFrameCallback.cpp )

# Add library for common plugin code
set(LIB_PROCESSOR FrameProcessor) 
add_library(${LIB_PROCESSOR} SHARED ${LIB_SOURCES})
target_link_libraries(${LIB_PROCESSOR} ${Boost_LIBRARIES} ${LOG4CXX_LIBRARIES} ${ZEROMQ_LIBRARIES} ${COMMON_LIBRARY})

file(GLOB APP_SOURCES FrameProcessorController.cpp 
                      SharedMemoryController.cpp 
                      SharedMemoryParser.cpp 
                      SocketHandler.cpp )

file(GLOB TEST_SOURCES *Test*.cpp)

add_executable(frameProcessor ${APP_SOURCES} FrameProcessorApp.cpp)

message(STATUS "HDF5 include files:  " ${HDF5_INCLUDE_DIRS})
message(STATUS "HDF5 libs:           " ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES})
message(STATUS "HDF5 defs:           " ${HDF5_DEFINITIONS})

target_link_libraries(frameProcessor ${LIB_PROCESSOR} ${Boost_LIBRARIES} ${LOG4CXX_LIBRARIES} ${ZEROMQ_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES} ${COMMON_LIBRARY})

# Add library for dummy plugin
add_library(DummyPlugin SHARED DummyPlugin.cpp)
target_link_libraries(DummyPlugin ${LIB_PROCESSOR} ${Boost_LIBRARIES} ${LOG4CXX_LIBRARIES} ${ZEROMQ_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES} ${COMMON_LIBRARY})

# Add library for HDF5 writer plugin
add_library(Hdf5Plugin SHARED FileWriterPlugin.cpp)
target_link_libraries(Hdf5Plugin ${LIB_PROCESSOR} ${Boost_LIBRARIES} ${LOG4CXX_LIBRARIES} ${ZEROMQ_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES} ${COMMON_LIBRARY})

# Add library for excalibur plugin
add_library(ExcaliburReorderPlugin SHARED ExcaliburReorderPlugin.cpp)
target_link_libraries(ExcaliburReorderPlugin ${LIB_PROCESSOR} ${Boost_LIBRARIES} ${LOG4CXX_LIBRARIES} ${ZEROMQ_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES} ${COMMON_LIBRARY})

# Add library for percival process plugin
add_library(PercivalProcessPlugin SHARED PercivalProcessPlugin.cpp)
target_link_libraries(PercivalProcessPlugin ${LIB_PROCESSOR} ${Boost_LIBRARIES} ${LOG4CXX_LIBRARIES} ${ZEROMQ_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5HL_LIBRARIES} ${COMMON_LIBRARY})
            
# Add test and project source files to executable
file(GLOB TESTABLE_SOURCES DataBlock.cpp DataBlockPool.cpp IFrameCallback.cpp FrameProcessorPlugin.cpp Frame.cpp)
add_executable(frameProcessorTest ${TEST_SOURCES} ${TESTABLE_SOURCES})

# Define libraries to link against
target_link_libraries(frameProcessorTest 
        ${Boost_LIBRARIES}
        ${LOG4CXX_LIBRARIES}
        ${ZEROMQ_LIBRARIES}
        ${HDF5_LIBRARIES} 
        ${HDF5HL_LIBRARIES}
        Hdf5Plugin
        ${COMMON_LIBRARY}) 

if ( ${CMAKE_SYSTEM_NAME} MATCHES Linux )
  # librt required for timing functions
  find_library(REALTIME_LIBRARY 
	  	NAMES rt)
  target_link_libraries( frameProcessor ${REALTIME_LIBRARY} )
  target_link_libraries( frameProcessorTest ${REALTIME_LIBRARY} )
endif()
        
{'fraction_non_alphanumeric': 0.08743004084102254, 'fraction_numerical': 0.009832098018454092, 'mean_word_length': 5.127896200185357, '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': '7638693', 'n_tokens_mistral': 2437, 'n_tokens_neox': 2205, 'n_words': 375}