<commit_before>cmake_minimum_required (VERSION 2.6)

# Maps to Visual Studio solution file (Tutorial.sln)
# The solution will have all targets (exe, lib, dll) 
# as Visual Studio projects (.vcproj)
project (hybrid_automaton)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")

option(UNIT_TESTS "Build all tests." OFF)

# If you want to do special things on linux
if(CMAKE_COMPILER_IS_GNUCXX)
#	add_definitions(-Wall -ansi -Wno-deprecated -pthread)
endif()

# If you want to do special things on windows
if(MSVC)
    set(MSVC_COMPILER_DEFS "/MP")
	add_definitions(/MP)
endif() 

# Turn on the ability to create folders to organize projects (.vcproj)
# It creates "CMakePredefinedTargets" folder by default and adds CMake
# defined projects like INSTALL.vcproj and ZERO_CHECK.vcproj
set_property (GLOBAL PROPERTY USE_FOLDERS ON)

find_package(TinyXML)
if(NOT TinyXML_FOUND)
	#message ("TinyXML not found automatically. Retrying using TinyXML_ROOT_DIR=${PROJECT_SOURCE_DIR}/../thirdparty/tinyxml/")
	set (TinyXML_ROOT_DIR "${PROJECT_SOURCE_DIR}/../thirdparty/tinyxml/")
	find_package(TinyXML)
endif()

if(NOT TinyXML_FOUND)
	message (FATAL_ERROR "TinyXML not found!!")
	if (CMAKE_COMPILER_IS_GNUCXX)
        message("Hint: Try to install package libtinyxml-dev or set -DTinyXML_ROOT_DIR=/path/to/custom/tinyxml")	
    endif()
else()
	message ("TinyXML found with include directories TinyXML_INCLUDE_DIRS=${TinyXML_INCLUDE_DIRS}")
	include_directories(${TinyXML_INCLUDE_DIRS})
endif()

find_package(Boost 1.46.0)
if(NOT Boost_FOUND AND WIN32)
	message ("Boost not found automatically. Retrying using BOOST_ROOT=C:/Program Files/boost/boost_1_57_0")
	set (BOOST_ROOT "C:/Program Files/boost/boost_1_57_0")
	find_package(Boost 1.46.0)
endif()
	
if(NOT Boost_FOUND)
	message (FATAL_ERROR "Boost not found!!")
else()
	message ("Boost found with root directory BOOST_ROOT=${BOOST_ROOT}")
	include_directories(${Boost_INCLUDE_DIR})
	include_directories(${BOOST_ROOT} )
endif()

find_package(Eigen3)
if(NOT EIGEN3_FOUND AND WIN32)
	message ("Eigen not found automatically. Retrying using EIGEN_DIR=C:/Program Files/eigen/eigen-eigen-1306d75b4a21")
	set (EIGEN_DIR "C:/Program Files/eigen/eigen-eigen-1306d75b4a21")
	find_package(Eigen3)
endif()

if(NOT EIGEN3_FOUND)
	message (FATAL_ERROR "Eigen not found!!")
    if (UNIX)
        message("Hint: Try to install package libeigen3-dev or set -DEIGEN_DIR=/path/to/custom/libeigen3")	
    endif()
else()
	message ("Eigen found with include directories EIGEN3_INCLUDE_DIR=${EIGEN3_INCLUDE_DIR}")
	include_directories(${EIGEN3_INCLUDE_DIR} )
endif()




# code for compiling the doxygen documentation
find_package(Doxygen)
if(NOT DOXYGEN_FOUND)
    message ("Doxygen not found. You will not be able to compile the documentation.")
else()
    message ("Doxygen found: ${DOXYGEN_EXECUTABLE}.")
    message ("Hint: Use make doc to compile documentation.")
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)  #configure doxygen to build into the build directory
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/doxygen_redirect_html.in ${CMAKE_CURRENT_SOURCE_DIR}/documentation.html @ONLY) #create a nice redirection to the build directory so documentation is easy to find
    add_custom_target(doc 
        ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
        COMMENT "Generating API documentation with Doxygen in ${CMAKE_CURRENT_BINARY_DIR}/html and ${CMAKE_CURRENT_BINARY_DIR}/latex" VERBATIM
    )
endif()




# Set compiler flags and options. 
# Here it is setting the Visual Studio warning level to 4
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")

# Command to output information to the console
# Useful for displaying errors, warnings, and debugging
#message ("cxx Flags: " ${CMAKE_CXX_FLAGS})

include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_SOURCE_DIR}/include)

# Collect sources into the variable HA_SOURCES 
set (HA_CORE_HEADERS
    "${PROJECT_SOURCE_DIR}/include/hybrid_automaton/HybridAutomaton.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/HybridAutomatonOStringStream.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/HybridAutomatonRegistration.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/ControlMode.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/ControlSwitch.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/ControlSet.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/Controller.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/JumpCondition.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/System.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/Serializable.h")

set (HA_SENSOR_HEADERS
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/Sensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/ClockSensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/ForceTorqueSensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/FramePoseSensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/JointConfigurationSensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/FrameDisplacementSensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/FrameOrientationSensor.h")

set (HA_DESCRIPTION_HEADERS
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/DescriptionTree.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/DescriptionTreeNode.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/DescriptionTreeXML.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/DescriptionTreeNodeXML.h")


set (HA_CORE_SOURCES
    "${PROJECT_SOURCE_DIR}/src/HybridAutomaton.cpp"
    "${PROJECT_SOURCE_DIR}/src/HybridAutomatonOStringStream.cpp"
    "${PROJECT_SOURCE_DIR}/src/ControlMode.cpp"
    "${PROJECT_SOURCE_DIR}/src/ControlSwitch.cpp"
    "${PROJECT_SOURCE_DIR}/src/ControlSet.cpp"
    "${PROJECT_SOURCE_DIR}/src/Controller.cpp"
    "${PROJECT_SOURCE_DIR}/src/JumpCondition.cpp")

set (HA_DESCRIPTION_SOURCES
    "${PROJECT_SOURCE_DIR}/src/DescriptionTreeNode.cpp"
    "${PROJECT_SOURCE_DIR}/src/DescriptionTreeXML.cpp"
    "${PROJECT_SOURCE_DIR}/src/DescriptionTreeNodeXML.cpp")

set (HA_SENSOR_SOURCES
    "${PROJECT_SOURCE_DIR}/src/Sensor.cpp"
    "${PROJECT_SOURCE_DIR}/src/ClockSensor.cpp"
    "${PROJECT_SOURCE_DIR}/src/ForceTorqueSensor.cpp"
    "${PROJECT_SOURCE_DIR}/src/FramePoseSensor.cpp"
    "${PROJECT_SOURCE_DIR}/src/JointConfigurationSensor.cpp"
    "${PROJECT_SOURCE_DIR}/src/FrameDisplacementSensor.cpp"
	"${PROJECT_SOURCE_DIR}/src/FrameOrientationSensor.cpp")
	
source_group("Header Files" FILES ${HA_CORE_HEADERS})

source_group("Header Files\\Description" FILES ${HA_DESCRIPTION_HEADERS})

source_group("Header Files\\Sensor" FILES ${HA_SENSOR_HEADERS})<commit_msg>Added missing files<commit_after>cmake_minimum_required (VERSION 2.6)

# Maps to Visual Studio solution file (Tutorial.sln)
# The solution will have all targets (exe, lib, dll) 
# as Visual Studio projects (.vcproj)
project (hybrid_automaton)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")

option(UNIT_TESTS "Build all tests." OFF)

# If you want to do special things on linux
if(CMAKE_COMPILER_IS_GNUCXX)
#	add_definitions(-Wall -ansi -Wno-deprecated -pthread)
endif()

# If you want to do special things on windows
if(MSVC)
    set(MSVC_COMPILER_DEFS "/MP")
	add_definitions(/MP)
endif() 

# Turn on the ability to create folders to organize projects (.vcproj)
# It creates "CMakePredefinedTargets" folder by default and adds CMake
# defined projects like INSTALL.vcproj and ZERO_CHECK.vcproj
set_property (GLOBAL PROPERTY USE_FOLDERS ON)

find_package(TinyXML)
if(NOT TinyXML_FOUND)
	#message ("TinyXML not found automatically. Retrying using TinyXML_ROOT_DIR=${PROJECT_SOURCE_DIR}/../thirdparty/tinyxml/")
	set (TinyXML_ROOT_DIR "${PROJECT_SOURCE_DIR}/../thirdparty/tinyxml/")
	find_package(TinyXML)
endif()

if(NOT TinyXML_FOUND)
	message (FATAL_ERROR "TinyXML not found!!")
	if (CMAKE_COMPILER_IS_GNUCXX)
        message("Hint: Try to install package libtinyxml-dev or set -DTinyXML_ROOT_DIR=/path/to/custom/tinyxml")	
    endif()
else()
	message ("TinyXML found with include directories TinyXML_INCLUDE_DIRS=${TinyXML_INCLUDE_DIRS}")
	include_directories(${TinyXML_INCLUDE_DIRS})
endif()

find_package(Boost 1.46.0)
if(NOT Boost_FOUND AND WIN32)
	message ("Boost not found automatically. Retrying using BOOST_ROOT=C:/Program Files/boost/boost_1_57_0")
	set (BOOST_ROOT "C:/Program Files/boost/boost_1_57_0")
	find_package(Boost 1.46.0)
endif()
	
if(NOT Boost_FOUND)
	message (FATAL_ERROR "Boost not found!!")
else()
	message ("Boost found with root directory BOOST_ROOT=${BOOST_ROOT}")
	include_directories(${Boost_INCLUDE_DIR})
	include_directories(${BOOST_ROOT} )
endif()

find_package(Eigen3)
if(NOT EIGEN3_FOUND AND WIN32)
	message ("Eigen not found automatically. Retrying using EIGEN_DIR=C:/Program Files/eigen/eigen-eigen-1306d75b4a21")
	set (EIGEN_DIR "C:/Program Files/eigen/eigen-eigen-1306d75b4a21")
	find_package(Eigen3)
endif()

if(NOT EIGEN3_FOUND)
	message (FATAL_ERROR "Eigen not found!!")
    if (UNIX)
        message("Hint: Try to install package libeigen3-dev or set -DEIGEN_DIR=/path/to/custom/libeigen3")	
    endif()
else()
	message ("Eigen found with include directories EIGEN3_INCLUDE_DIR=${EIGEN3_INCLUDE_DIR}")
	include_directories(${EIGEN3_INCLUDE_DIR} )
endif()




# code for compiling the doxygen documentation
find_package(Doxygen)
if(NOT DOXYGEN_FOUND)
    message ("Doxygen not found. You will not be able to compile the documentation.")
else()
    message ("Doxygen found: ${DOXYGEN_EXECUTABLE}.")
    message ("Hint: Use make doc to compile documentation.")
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)  #configure doxygen to build into the build directory
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/doxygen_redirect_html.in ${CMAKE_CURRENT_SOURCE_DIR}/documentation.html @ONLY) #create a nice redirection to the build directory so documentation is easy to find
    add_custom_target(doc 
        ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
        COMMENT "Generating API documentation with Doxygen in ${CMAKE_CURRENT_BINARY_DIR}/html and ${CMAKE_CURRENT_BINARY_DIR}/latex" VERBATIM
    )
endif()




# Set compiler flags and options. 
# Here it is setting the Visual Studio warning level to 4
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")

# Command to output information to the console
# Useful for displaying errors, warnings, and debugging
#message ("cxx Flags: " ${CMAKE_CXX_FLAGS})

include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_SOURCE_DIR}/include)

# Collect sources into the variable HA_SOURCES 
set (HA_CORE_HEADERS
    "${PROJECT_SOURCE_DIR}/include/hybrid_automaton/HybridAutomaton.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/HybridAutomatonOStringStream.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/HybridAutomatonRegistration.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/ControlMode.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/ControlSwitch.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/ControlSet.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/Controller.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/JumpCondition.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/System.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/Serializable.h")

set (HA_SENSOR_HEADERS
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/Sensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/ClockSensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/ForceTorqueSensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/FramePoseSensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/JointConfigurationSensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/FrameDisplacementSensor.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/FrameOrientationSensor.h"
 	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/ROSTopicSensor.h")

set (HA_DESCRIPTION_HEADERS
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/DescriptionTree.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/DescriptionTreeNode.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/DescriptionTreeXML.h"
	"${PROJECT_SOURCE_DIR}/include/hybrid_automaton/DescriptionTreeNodeXML.h")


set (HA_CORE_SOURCES
    "${PROJECT_SOURCE_DIR}/src/HybridAutomaton.cpp"
    "${PROJECT_SOURCE_DIR}/src/HybridAutomatonOStringStream.cpp"
    "${PROJECT_SOURCE_DIR}/src/ControlMode.cpp"
    "${PROJECT_SOURCE_DIR}/src/ControlSwitch.cpp"
    "${PROJECT_SOURCE_DIR}/src/ControlSet.cpp"
    "${PROJECT_SOURCE_DIR}/src/Controller.cpp"
    "${PROJECT_SOURCE_DIR}/src/JumpCondition.cpp")

set (HA_DESCRIPTION_SOURCES
    "${PROJECT_SOURCE_DIR}/src/DescriptionTreeNode.cpp"
    "${PROJECT_SOURCE_DIR}/src/DescriptionTreeXML.cpp"
    "${PROJECT_SOURCE_DIR}/src/DescriptionTreeNodeXML.cpp")

set (HA_SENSOR_SOURCES
    "${PROJECT_SOURCE_DIR}/src/Sensor.cpp"
    "${PROJECT_SOURCE_DIR}/src/ClockSensor.cpp"
    "${PROJECT_SOURCE_DIR}/src/ForceTorqueSensor.cpp"
    "${PROJECT_SOURCE_DIR}/src/FramePoseSensor.cpp"
    "${PROJECT_SOURCE_DIR}/src/JointConfigurationSensor.cpp"
    "${PROJECT_SOURCE_DIR}/src/FrameDisplacementSensor.cpp"
	"${PROJECT_SOURCE_DIR}/src/FrameOrientationSensor.cpp"
	"${PROJECT_SOURCE_DIR}/src/ROSTopicSensor.cpp")
	
source_group("Header Files" FILES ${HA_CORE_HEADERS})

source_group("Header Files\\Description" FILES ${HA_DESCRIPTION_HEADERS})

source_group("Header Files\\Sensor" FILES ${HA_SENSOR_HEADERS})
{'fraction_non_alphanumeric': 0.11404286770140429, 'fraction_numerical': 0.00753880266075388, 'mean_word_length': 6.605958403597526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '2302688', 'n_tokens_mistral': 4886, 'n_tokens_neox': 4669, 'n_words': 831}