<commit_before># build using
# mkdir build
# cd build
# cmake -G "MSSYS Makefiles" ../CMake/  # -For Windows
# 
# make

PROJECT( libaps2 )
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)


# define WIN32 for winpcap
if (WIN32)
	SET (  WINPCAPPATH "C:\\Apps\\winpcap" )
	INCLUDE_DIRECTORIES(${WINPCAPPATH}/Include)
	add_definitions( -DWIN32 )
endif(WIN32)


#look for hdf5 and otherwise hack in mingw64 built one
FIND_PACKAGE(HDF5)
if (HDF5_FOUND)
INCLUDE_DIRECTORIES( ${HDF5_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${HDF5_INCLUDE_DIR}/cpp )
else()
INCLUDE_DIRECTORIES("C:\\MinGW\\msys\\1.0\\local\\hdf5\\include")
INCLUDE_DIRECTORIES("C:\\MinGW\\msys\\1.0\\local\\hdf5\\include\\cpp")
LINK_DIRECTORIES( ${LINK_DIRECTORIES} "C:\\MinGW\\msys\\1.0\\local\\hdf5\\lib")  
endif()


#Grab all the header files in the src directory including concol.h
INCLUDE_DIRECTORIES("./APS/")

#Check for 32bit or 64 bit platform and link against the appropriate winpcap
If(CMAKE_SIZEOF_VOID_P EQUAL 8)
	LINK_DIRECTORIES( ${LINK_DIRECTORIES} "..\\lib\\winpcap\\x64\\")    
 else()
     LINK_DIRECTORIES( ${LINK_DIRECTORIES} "..\\lib\\winpcap\\x86\\")  
 endif()


#Add flags for gcc and C++11
ADD_DEFINITIONS(${CMAKE_CXX_FLAGS} "-DGCC")
ADD_DEFINITIONS(${CMAKE_CXX_FLAGS} "-std=c++11")

SET ( DLL_SRC 
	./APS/libaps.cpp
	./APS/FPGA.cpp
	./APS/Channel.cpp
	./APS/APS.cpp
	./APS/APSRack.cpp
	./APS/LLBank.cpp
	./APS/EthernetControl.cpp
	./APS/APS2.cpp
)


SET_SOURCE_FILES_PROPERTIES( ${DLL_SRC} PROPERTIES LANGUAGE CXX )

ADD_LIBRARY( aps2 SHARED ${DLL_SRC} )

ADD_EXECUTABLE(test
	./test/main.cpp
)

ADD_EXECUTABLE(echo
	./test/echo.cpp
	./APS/EthernetControl.cpp 
	./APS/DummyAPS.cpp
	./APS/APS2.cpp
)

#For Windows pull in some additional libraries for network stuff
if (WIN32)
TARGET_LINK_LIBRARIES(echo 
	wpcap Packet
	ws2_32
	iphlpapi 
)
endif(WIN32)
<commit_msg>Remove FGPA dependency in CMake file.<commit_after># build using
# mkdir build
# cd build
# cmake -G "MSSYS Makefiles" ../CMake/  # -For Windows
# 
# make

PROJECT( libaps2 )
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)


# define WIN32 for winpcap
if (WIN32)
	SET (  WINPCAPPATH "C:\\Apps\\winpcap" )
	INCLUDE_DIRECTORIES(${WINPCAPPATH}/Include)
	add_definitions( -DWIN32 )
endif(WIN32)


#look for hdf5 and otherwise hack in mingw64 built one
FIND_PACKAGE(HDF5)
if (HDF5_FOUND)
INCLUDE_DIRECTORIES( ${HDF5_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${HDF5_INCLUDE_DIR}/cpp )
else()
INCLUDE_DIRECTORIES("C:\\MinGW\\msys\\1.0\\local\\hdf5\\include")
INCLUDE_DIRECTORIES("C:\\MinGW\\msys\\1.0\\local\\hdf5\\include\\cpp")
LINK_DIRECTORIES( ${LINK_DIRECTORIES} "C:\\MinGW\\msys\\1.0\\local\\hdf5\\lib")  
endif()


#Grab all the header files in the src directory including concol.h
INCLUDE_DIRECTORIES("./APS/")

#Check for 32bit or 64 bit platform and link against the appropriate winpcap
If(CMAKE_SIZEOF_VOID_P EQUAL 8)
	LINK_DIRECTORIES( ${LINK_DIRECTORIES} "..\\lib\\winpcap\\x64\\")    
 else()
     LINK_DIRECTORIES( ${LINK_DIRECTORIES} "..\\lib\\winpcap\\x86\\")  
 endif()


#Add flags for gcc and C++11
ADD_DEFINITIONS(${CMAKE_CXX_FLAGS} "-DGCC")
ADD_DEFINITIONS(${CMAKE_CXX_FLAGS} "-std=c++11")

SET ( DLL_SRC 
	./APS/libaps.cpp
	./APS/Channel.cpp
	./APS/APS2.cpp
	./APS/APSRack.cpp
	./APS/LLBank.cpp
	./APS/EthernetControl.cpp
	./APS/APS2.cpp
)


SET_SOURCE_FILES_PROPERTIES( ${DLL_SRC} PROPERTIES LANGUAGE CXX )

ADD_LIBRARY( aps2 SHARED ${DLL_SRC} )

ADD_EXECUTABLE(test
	./test/main.cpp
)

ADD_EXECUTABLE(echo
	./test/echo.cpp
	./APS/EthernetControl.cpp 
	./APS/DummyAPS.cpp
	./APS/APS2.cpp
)

#For Windows pull in some additional libraries for network stuff
if (WIN32)
TARGET_LINK_LIBRARIES(echo 
	wpcap Packet
	ws2_32
	iphlpapi 
)
endif(WIN32)

{'fraction_non_alphanumeric': 0.1472108843537415, 'fraction_numerical': 0.027482993197278913, 'mean_word_length': 4.126917712691771, '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': '5088575', 'n_tokens_mistral': 1672, 'n_tokens_neox': 1502, 'n_words': 296}