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

find_package(Boost REQUIRED COMPONENTS regex)

find_package(catkin REQUIRED COMPONENTS 
   roscpp 
   rostime 
   topic_tools 
   rosbag 
   rosbag_storage 
   roscpp_serialization
)

# Build flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ")

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
   INCLUDE_DIRS include
   LIBRARIES ros_type_introspection
   CATKIN_DEPENDS 
   roscpp 
   rostime 
   topic_tools 
   rosbag 
   rosbag_storage 
   roscpp_serialization
   DEPENDS 
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations

include_directories(
  ${catkin_INCLUDE_DIRS}
  include
)

## Declare a C++ library
 add_library(ros_type_introspection
   src/parser.cpp
   src/deserializer.cpp
   src/renamer.cpp

   include/ros_type_introspection/parser.hpp
   include/ros_type_introspection/deserializer.hpp
   include/ros_type_introspection/string.hpp
   include/ros_type_introspection/renamer.hpp
   include/ros_type_introspection/stringtree.hpp
 )

target_link_libraries(ros_type_introspection ${catkin_LIBRARIES})

# Declare a C++ executable
add_executable(ros_introspection_benchmark src/tests/benchmark.cpp)
add_dependencies(ros_introspection_benchmark
    ${${PROJECT_NAME}_EXPORTED_TARGETS}
    ${catkin_EXPORTED_TARGETS})

target_link_libraries(ros_introspection_benchmark
 ${catkin_LIBRARIES}
  ros_type_introspection
  benchmark
)


#############
## Install ##
#############

# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html<commit_msg>fixed compilation when benchmark not found<commit_after>cmake_minimum_required(VERSION 2.8.3)
project(ros_type_introspection)

find_package(Boost REQUIRED COMPONENTS regex)

find_package(catkin REQUIRED COMPONENTS 
   roscpp 
   rostime 
   topic_tools 
   rosbag 
   rosbag_storage 
   roscpp_serialization
)

# Build flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ")

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
   INCLUDE_DIRS include
   LIBRARIES ros_type_introspection
   CATKIN_DEPENDS 
   roscpp 
   rostime 
   topic_tools 
   rosbag 
   rosbag_storage 
   roscpp_serialization
   DEPENDS 
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations

include_directories(
  ${catkin_INCLUDE_DIRS}
  include
)

## Declare a C++ library
 add_library(ros_type_introspection
   src/parser.cpp
   src/deserializer.cpp
   src/renamer.cpp

   include/ros_type_introspection/parser.hpp
   include/ros_type_introspection/deserializer.hpp
   include/ros_type_introspection/string.hpp
   include/ros_type_introspection/renamer.hpp
   include/ros_type_introspection/stringtree.hpp
 )

target_link_libraries(ros_type_introspection ${catkin_LIBRARIES})

find_package(benchmark CONFIG)
if (benchmark_FOUND)

add_executable(ros_introspection_benchmark src/tests/benchmark.cpp)
add_dependencies(ros_introspection_benchmark
    ${${PROJECT_NAME}_EXPORTED_TARGETS}
    ${catkin_EXPORTED_TARGETS})

target_link_libraries(ros_introspection_benchmark
 ${catkin_LIBRARIES}
  ros_type_introspection
  benchmark
)

endif()


#############
## Install ##
#############

# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
{'fraction_non_alphanumeric': 0.11162687886825817, 'fraction_numerical': 0.0022104332449160036, 'mean_word_length': 5.634897360703812, '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': '2074820', 'n_tokens_mistral': 1491, 'n_tokens_neox': 1378, 'n_words': 307}