<commit_before>cmake_minimum_required(VERSION 2.8.3)
project(wsg_32_driver)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  roscpp
  std_msgs
  std_srvs
  wsg_32_common
)

catkin_package(
#   INCLUDE_DIRS include
#  LIBRARIES vh_pixelmap
  CATKIN_DEPENDS roscpp std_msgs std_srvs wsg_32_common
#  DEPENDS system_lib
)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)


# WSG_50_TCP version
set(DRIVER_SOURCES 
  src/checksum.cpp include/wsg_32/checksum.h
  src/cmd.c include/wsg_32/cmd.h
  src/common.cpp include/wsg_32/common.h
  src/functions.cpp include/wsg_32/functions.h
  src/interface.cpp include/wsg_32/interface.h
  src/main.cpp
  src/msg.c include/wsg_32/msg.h
  src/serial.c include/wsg_32/serial.h
  src/tcp.c include/wsg_32/tcp.h
  src/udp.c include/wsg_32/udp.h)

# WSG_50_CAN version
set(DRIVER_SOURCES_CAN
  src/checksum.cpp
  src/common.cpp
  src/functions_can.cpp
  src/msg.c)

include_directories(include ${catkin_INCLUDE_DIRS}) 
add_definitions(-DOSNAME_LINUX)
add_definitions(-g)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") # Need C++11 

add_executable(wsg_32_ip src/main.cpp ${DRIVER_SOURCES})
target_link_libraries(wsg_32_ip ${catkin_LIBRARIES})

#add_executable(wsg_32_can src/main_can.cpp src/checksum.cpp src/msg.c src/common.cpp src/functions_can.cpp)
#add_executable(wsg_32_can src/main_can.cpp ${DRIVER_SOURCES_CAN})

#include_directories(/home/marc/peak-linux-driver-7.5/driver/src/)
#link_directories(/home/marc/peak-linux-driver-7.5/lib/)
#add_compile_flags(wsg_32_can -g -Wall)<commit_msg>fix bugs to prevent compile error because of message dependencies<commit_after>cmake_minimum_required(VERSION 2.8.3)
project(wsg_32_driver)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  roscpp
  std_msgs
  std_srvs
  wsg_32_common
)

catkin_package(
#   INCLUDE_DIRS include
#  LIBRARIES vh_pixelmap
  CATKIN_DEPENDS roscpp std_msgs std_srvs wsg_32_common
#  DEPENDS system_lib
)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)


# WSG_50_TCP version
set(DRIVER_SOURCES 
  src/checksum.cpp include/wsg_32/checksum.h
  src/cmd.c include/wsg_32/cmd.h
  src/common.cpp include/wsg_32/common.h
  src/functions.cpp include/wsg_32/functions.h
  src/interface.cpp include/wsg_32/interface.h
  src/main.cpp
  src/msg.c include/wsg_32/msg.h
  src/serial.c include/wsg_32/serial.h
  src/tcp.c include/wsg_32/tcp.h
  src/udp.c include/wsg_32/udp.h)

# WSG_50_CAN version
set(DRIVER_SOURCES_CAN
  src/checksum.cpp
  src/common.cpp
  src/functions_can.cpp
  src/msg.c)

include_directories(include ${catkin_INCLUDE_DIRS}) 
add_definitions(-DOSNAME_LINUX)
add_definitions(-g)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") # Need C++11 

add_executable(wsg_32_ip src/main.cpp ${DRIVER_SOURCES})
add_dependencies(wsg_32_ip ${catkin_EXPORTED_TARGETS})
target_link_libraries(wsg_32_ip ${catkin_LIBRARIES})

#add_executable(wsg_32_can src/main_can.cpp src/checksum.cpp src/msg.c src/common.cpp src/functions_can.cpp)
#add_executable(wsg_32_can src/main_can.cpp ${DRIVER_SOURCES_CAN})

#include_directories(/home/marc/peak-linux-driver-7.5/driver/src/)
#link_directories(/home/marc/peak-linux-driver-7.5/lib/)
#add_compile_flags(wsg_32_can -g -Wall)
{'fraction_non_alphanumeric': 0.10186994138989673, 'fraction_numerical': 0.027351381523862683, 'mean_word_length': 5.446043165467626, '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': '5280107', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1429, 'n_words': 230}