-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commented out unnecessary CMakeLists
Showing
3 changed files
with
156 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
include_directories( ../sample_nodes ) | ||
|
||
set(CMAKE_DEBUG_POSTFIX "") | ||
|
||
function(CompileExample name) | ||
add_executable(${name} ${name}.cpp ) | ||
target_link_libraries(${name} ${BTCPP_LIBRARY} bt_sample_nodes ) | ||
endfunction() | ||
|
||
|
||
# The plugin libdummy_nodes.so can be linked statically or | ||
# loaded dynamically at run-time. | ||
add_executable(t01_first_tree_static t01_build_your_first_tree.cpp ) | ||
target_compile_definitions(t01_first_tree_static PRIVATE "MANUAL_STATIC_LINKING") | ||
target_link_libraries(t01_first_tree_static ${BTCPP_LIBRARY} bt_sample_nodes ) | ||
|
||
add_executable(t01_first_tree_dynamic t01_build_your_first_tree.cpp ) | ||
target_link_libraries(t01_first_tree_dynamic ${BTCPP_LIBRARY} ) | ||
|
||
CompileExample("t02_basic_ports") | ||
CompileExample("t03_generic_ports") | ||
CompileExample("t04_reactive_sequence") | ||
CompileExample("t05_crossdoor") | ||
CompileExample("t06_subtree_port_remapping") | ||
CompileExample("t07_load_multiple_xml") | ||
CompileExample("t08_additional_node_args") | ||
CompileExample("t09_scripting") | ||
CompileExample("t10_observer") | ||
|
||
if(BTCPP_GROOT_INTERFACE) | ||
CompileExample("t11_groot_howto") | ||
endif() | ||
|
||
CompileExample("t12_default_ports") | ||
CompileExample("t13_access_by_ref") | ||
CompileExample("t14_subtree_model") | ||
CompileExample("t15_nodes_mocking") | ||
CompileExample("t16_global_blackboard") | ||
CompileExample("t17_blackboard_backup") | ||
CompileExample("t18_waypoints") | ||
|
||
CompileExample("ex01_wrap_legacy") | ||
CompileExample("ex02_runtime_ports") | ||
|
||
if(BTCPP_SQLITE_LOGGING) | ||
CompileExample("ex03_sqlite_log") | ||
endif() | ||
|
||
|
||
############ Create plugin and executor in folder plugin_example ########## | ||
|
||
# library must be SHARED | ||
add_library(test_plugin_action SHARED plugin_example/plugin_action.cpp ) | ||
# you must set the definition BT_PLUGIN_EXPORT | ||
target_compile_definitions(test_plugin_action PRIVATE BT_PLUGIN_EXPORT ) | ||
# remove the "lib" prefix. Name of the file will be test_plugin_action.so | ||
set_target_properties(test_plugin_action PROPERTIES PREFIX "") | ||
# link dependencies as usual | ||
target_link_libraries(test_plugin_action ${BTCPP_LIBRARY} ) | ||
|
||
add_executable(test_plugin_executor plugin_example/plugin_executor.cpp ) | ||
target_link_libraries(test_plugin_executor ${BTCPP_LIBRARY}) | ||
# include_directories( ../sample_nodes ) | ||
|
||
# set(CMAKE_DEBUG_POSTFIX "") | ||
|
||
# function(CompileExample name) | ||
# add_executable(${name} ${name}.cpp ) | ||
# target_link_libraries(${name} ${BTCPP_LIBRARY} bt_sample_nodes ) | ||
# endfunction() | ||
|
||
|
||
# # The plugin libdummy_nodes.so can be linked statically or | ||
# # loaded dynamically at run-time. | ||
# add_executable(t01_first_tree_static t01_build_your_first_tree.cpp ) | ||
# target_compile_definitions(t01_first_tree_static PRIVATE "MANUAL_STATIC_LINKING") | ||
# target_link_libraries(t01_first_tree_static ${BTCPP_LIBRARY} bt_sample_nodes ) | ||
|
||
# add_executable(t01_first_tree_dynamic t01_build_your_first_tree.cpp ) | ||
# target_link_libraries(t01_first_tree_dynamic ${BTCPP_LIBRARY} ) | ||
|
||
# CompileExample("t02_basic_ports") | ||
# CompileExample("t03_generic_ports") | ||
# CompileExample("t04_reactive_sequence") | ||
# CompileExample("t05_crossdoor") | ||
# CompileExample("t06_subtree_port_remapping") | ||
# CompileExample("t07_load_multiple_xml") | ||
# CompileExample("t08_additional_node_args") | ||
# CompileExample("t09_scripting") | ||
# CompileExample("t10_observer") | ||
|
||
# if(BTCPP_GROOT_INTERFACE) | ||
# CompileExample("t11_groot_howto") | ||
# endif() | ||
|
||
# CompileExample("t12_default_ports") | ||
# CompileExample("t13_access_by_ref") | ||
# CompileExample("t14_subtree_model") | ||
# CompileExample("t15_nodes_mocking") | ||
# CompileExample("t16_global_blackboard") | ||
# CompileExample("t17_blackboard_backup") | ||
# CompileExample("t18_waypoints") | ||
|
||
# CompileExample("ex01_wrap_legacy") | ||
# CompileExample("ex02_runtime_ports") | ||
|
||
# if(BTCPP_SQLITE_LOGGING) | ||
# CompileExample("ex03_sqlite_log") | ||
# endif() | ||
|
||
|
||
# ############ Create plugin and executor in folder plugin_example ########## | ||
|
||
# # library must be SHARED | ||
# add_library(test_plugin_action SHARED plugin_example/plugin_action.cpp ) | ||
# # you must set the definition BT_PLUGIN_EXPORT | ||
# target_compile_definitions(test_plugin_action PRIVATE BT_PLUGIN_EXPORT ) | ||
# # remove the "lib" prefix. Name of the file will be test_plugin_action.so | ||
# set_target_properties(test_plugin_action PROPERTIES PREFIX "") | ||
# # link dependencies as usual | ||
# target_link_libraries(test_plugin_action ${BTCPP_LIBRARY} ) | ||
|
||
# add_executable(test_plugin_executor plugin_example/plugin_executor.cpp ) | ||
# target_link_libraries(test_plugin_executor ${BTCPP_LIBRARY}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
include_directories( ../include ) | ||
# include_directories( ../include ) | ||
|
||
# compile as static libraries | ||
# # compile as static libraries | ||
|
||
set(CMAKE_DEBUG_POSTFIX "") | ||
# set(CMAKE_DEBUG_POSTFIX "") | ||
|
||
add_library(bt_sample_nodes STATIC | ||
crossdoor_nodes.cpp | ||
dummy_nodes.cpp | ||
movebase_node.cpp ) | ||
# add_library(bt_sample_nodes STATIC | ||
# crossdoor_nodes.cpp | ||
# dummy_nodes.cpp | ||
# movebase_node.cpp ) | ||
|
||
target_link_libraries(bt_sample_nodes PRIVATE ${BTCPP_LIBRARY}) | ||
set_target_properties(bt_sample_nodes PROPERTIES ARCHIVE_OUTPUT_DIRECTORY | ||
${BTCPP_LIB_DESTINATION} ) | ||
# target_link_libraries(bt_sample_nodes PRIVATE ${BTCPP_LIBRARY}) | ||
# set_target_properties(bt_sample_nodes PROPERTIES ARCHIVE_OUTPUT_DIRECTORY | ||
# ${BTCPP_LIB_DESTINATION} ) | ||
|
||
# to create a plugin, compile them in this way instead | ||
# # to create a plugin, compile them in this way instead | ||
|
||
add_library(crossdoor_nodes_dyn SHARED crossdoor_nodes.cpp ) | ||
target_link_libraries(crossdoor_nodes_dyn PRIVATE ${BTCPP_LIBRARY}) | ||
target_compile_definitions(crossdoor_nodes_dyn PRIVATE BT_PLUGIN_EXPORT ) | ||
set_target_properties(crossdoor_nodes_dyn PROPERTIES LIBRARY_OUTPUT_DIRECTORY | ||
${BTCPP_BIN_DESTINATION} ) | ||
# add_library(crossdoor_nodes_dyn SHARED crossdoor_nodes.cpp ) | ||
# target_link_libraries(crossdoor_nodes_dyn PRIVATE ${BTCPP_LIBRARY}) | ||
# target_compile_definitions(crossdoor_nodes_dyn PRIVATE BT_PLUGIN_EXPORT ) | ||
# set_target_properties(crossdoor_nodes_dyn PROPERTIES LIBRARY_OUTPUT_DIRECTORY | ||
# ${BTCPP_BIN_DESTINATION} ) | ||
|
||
add_library(dummy_nodes_dyn SHARED dummy_nodes.cpp ) | ||
target_link_libraries(dummy_nodes_dyn PRIVATE ${BTCPP_LIBRARY}) | ||
target_compile_definitions(dummy_nodes_dyn PRIVATE BT_PLUGIN_EXPORT) | ||
set_target_properties(dummy_nodes_dyn PROPERTIES LIBRARY_OUTPUT_DIRECTORY | ||
${BTCPP_BIN_DESTINATION} ) | ||
# add_library(dummy_nodes_dyn SHARED dummy_nodes.cpp ) | ||
# target_link_libraries(dummy_nodes_dyn PRIVATE ${BTCPP_LIBRARY}) | ||
# target_compile_definitions(dummy_nodes_dyn PRIVATE BT_PLUGIN_EXPORT) | ||
# set_target_properties(dummy_nodes_dyn PROPERTIES LIBRARY_OUTPUT_DIRECTORY | ||
# ${BTCPP_BIN_DESTINATION} ) | ||
|
||
|
||
add_library(movebase_node_dyn SHARED movebase_node.cpp ) | ||
target_link_libraries(movebase_node_dyn PRIVATE ${BTCPP_LIBRARY}) | ||
target_compile_definitions(movebase_node_dyn PRIVATE BT_PLUGIN_EXPORT ) | ||
set_target_properties(movebase_node_dyn PROPERTIES LIBRARY_OUTPUT_DIRECTORY | ||
${BTCPP_BIN_DESTINATION} ) | ||
# add_library(movebase_node_dyn SHARED movebase_node.cpp ) | ||
# target_link_libraries(movebase_node_dyn PRIVATE ${BTCPP_LIBRARY}) | ||
# target_compile_definitions(movebase_node_dyn PRIVATE BT_PLUGIN_EXPORT ) | ||
# set_target_properties(movebase_node_dyn PROPERTIES LIBRARY_OUTPUT_DIRECTORY | ||
# ${BTCPP_BIN_DESTINATION} ) | ||
|
||
###################################################### | ||
# INSTALL plugins for other packages to load | ||
# ###################################################### | ||
# # INSTALL plugins for other packages to load | ||
|
||
INSTALL(TARGETS | ||
crossdoor_nodes_dyn | ||
dummy_nodes_dyn | ||
movebase_node_dyn | ||
LIBRARY DESTINATION share/${PROJECT_NAME}/bt_plugins | ||
ARCHIVE DESTINATION share/${PROJECT_NAME}/bt_plugins | ||
RUNTIME DESTINATION share/${PROJECT_NAME}/bt_plugins | ||
) | ||
# INSTALL(TARGETS | ||
# crossdoor_nodes_dyn | ||
# dummy_nodes_dyn | ||
# movebase_node_dyn | ||
# LIBRARY DESTINATION share/${PROJECT_NAME}/bt_plugins | ||
# ARCHIVE DESTINATION share/${PROJECT_NAME}/bt_plugins | ||
# RUNTIME DESTINATION share/${PROJECT_NAME}/bt_plugins | ||
# ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,73 @@ | ||
###################################################### | ||
# TESTS | ||
# ###################################################### | ||
# # TESTS | ||
|
||
set(BT_TESTS | ||
src/action_test_node.cpp | ||
src/condition_test_node.cpp | ||
# set(BT_TESTS | ||
# src/action_test_node.cpp | ||
# src/condition_test_node.cpp | ||
|
||
gtest_any.cpp | ||
gtest_blackboard.cpp | ||
gtest_coroutines.cpp | ||
gtest_decorator.cpp | ||
gtest_enums.cpp | ||
gtest_factory.cpp | ||
gtest_fallback.cpp | ||
gtest_parallel.cpp | ||
gtest_preconditions.cpp | ||
gtest_ports.cpp | ||
gtest_postconditions.cpp | ||
gtest_match.cpp | ||
gtest_json.cpp | ||
gtest_reactive.cpp | ||
gtest_reactive_backchaining.cpp | ||
gtest_sequence.cpp | ||
gtest_skipping.cpp | ||
gtest_substitution.cpp | ||
gtest_subtree.cpp | ||
gtest_switch.cpp | ||
gtest_tree.cpp | ||
gtest_updates.cpp | ||
gtest_wakeup.cpp | ||
# gtest_any.cpp | ||
# gtest_blackboard.cpp | ||
# gtest_coroutines.cpp | ||
# gtest_decorator.cpp | ||
# gtest_enums.cpp | ||
# gtest_factory.cpp | ||
# gtest_fallback.cpp | ||
# gtest_parallel.cpp | ||
# gtest_preconditions.cpp | ||
# gtest_ports.cpp | ||
# gtest_postconditions.cpp | ||
# gtest_match.cpp | ||
# gtest_json.cpp | ||
# gtest_reactive.cpp | ||
# gtest_reactive_backchaining.cpp | ||
# gtest_sequence.cpp | ||
# gtest_skipping.cpp | ||
# gtest_substitution.cpp | ||
# gtest_subtree.cpp | ||
# gtest_switch.cpp | ||
# gtest_tree.cpp | ||
# gtest_updates.cpp | ||
# gtest_wakeup.cpp | ||
|
||
script_parser_test.cpp | ||
test_helper.hpp | ||
) | ||
# script_parser_test.cpp | ||
# test_helper.hpp | ||
# ) | ||
|
||
set(TEST_DEPENDECIES | ||
${BTCPP_LIBRARY} | ||
foonathan::lexy | ||
bt_sample_nodes) | ||
# set(TEST_DEPENDECIES | ||
# ${BTCPP_LIBRARY} | ||
# foonathan::lexy | ||
# bt_sample_nodes) | ||
|
||
if(ament_cmake_FOUND AND BUILD_TESTING) | ||
# if(ament_cmake_FOUND AND BUILD_TESTING) | ||
|
||
find_package(ament_cmake_gtest REQUIRED) | ||
# find_package(ament_cmake_gtest REQUIRED) | ||
|
||
ament_add_gtest(${BTCPP_LIBRARY}_test ${BT_TESTS}) | ||
target_link_libraries(${BTCPP_LIBRARY}_test | ||
${TEST_DEPENDECIES} | ||
${ament_LIBRARIES}) | ||
# ament_add_gtest(${BTCPP_LIBRARY}_test ${BT_TESTS}) | ||
# target_link_libraries(${BTCPP_LIBRARY}_test | ||
# ${TEST_DEPENDECIES} | ||
# ${ament_LIBRARIES}) | ||
|
||
elseif(catkin_FOUND AND CATKIN_ENABLE_TESTING) | ||
# elseif(catkin_FOUND AND CATKIN_ENABLE_TESTING) | ||
|
||
catkin_add_gtest(${BTCPP_LIBRARY}_test ${BT_TESTS}) | ||
target_link_libraries(${BTCPP_LIBRARY}_test | ||
${TEST_DEPENDECIES} | ||
Threads::Threads | ||
${catkin_LIBRARIES}) | ||
# catkin_add_gtest(${BTCPP_LIBRARY}_test ${BT_TESTS}) | ||
# target_link_libraries(${BTCPP_LIBRARY}_test | ||
# ${TEST_DEPENDECIES} | ||
# Threads::Threads | ||
# ${catkin_LIBRARIES}) | ||
|
||
else() | ||
# else() | ||
|
||
find_package(GTest REQUIRED) | ||
enable_testing() | ||
# find_package(GTest REQUIRED) | ||
# enable_testing() | ||
|
||
add_executable(${BTCPP_LIBRARY}_test ${BT_TESTS}) | ||
# add_executable(${BTCPP_LIBRARY}_test ${BT_TESTS}) | ||
|
||
target_link_libraries(${PROJECT_NAME}_test | ||
${TEST_DEPENDECIES} | ||
Threads::Threads | ||
GTest::gtest) | ||
# target_link_libraries(${PROJECT_NAME}_test | ||
# ${TEST_DEPENDECIES} | ||
# Threads::Threads | ||
# GTest::gtest) | ||
|
||
endif() | ||
# endif() | ||
|
||
target_include_directories(${BTCPP_LIBRARY}_test PRIVATE include ${PROJECT_SOURCE_DIR}/3rdparty) | ||
target_compile_definitions(${BTCPP_LIBRARY}_test PRIVATE BT_TEST_FOLDER="${CMAKE_CURRENT_SOURCE_DIR}") | ||
# target_include_directories(${BTCPP_LIBRARY}_test PRIVATE include ${PROJECT_SOURCE_DIR}/3rdparty) | ||
# target_compile_definitions(${BTCPP_LIBRARY}_test PRIVATE BT_TEST_FOLDER="${CMAKE_CURRENT_SOURCE_DIR}") |