From 55a886d23647296115712ad74f455063e2cd5a28 Mon Sep 17 00:00:00 2001 From: "Zhou, Wei" Date: Sat, 24 Jun 2023 14:38:39 -0600 Subject: [PATCH] Add behavior tree --- .vscode/settings.json | 1 + .../api/v1/query/client-vscode/query.json | 1 + build/CMakeCache.txt | 331 + build/CMakeFiles/3.22.1/CMakeSystem.cmake | 15 + .../CompilerIdCXX/CMakeCXXCompilerId.cpp | 791 + build/CMakeFiles/CMakeError.log | 2142 ++ build/CMakeFiles/CMakeOutput.log | 1 + build/CMakeFiles/cmake.check_cache | 1 + include/behaviortree_cpp/action_node.h | 233 + .../actions/always_failure_node.h | 36 + .../actions/always_success_node.h | 36 + .../actions/pop_from_queue.hpp | 145 + .../actions/script_condition.h | 78 + .../behaviortree_cpp/actions/script_node.h | 76 + .../actions/set_blackboard_node.h | 66 + include/behaviortree_cpp/actions/sleep_node.h | 45 + include/behaviortree_cpp/actions/test_node.h | 94 + include/behaviortree_cpp/basic_types.h | 428 + include/behaviortree_cpp/behavior_tree.h | 102 + include/behaviortree_cpp/blackboard.h | 216 + include/behaviortree_cpp/bt_factory.h | 502 + include/behaviortree_cpp/bt_parser.h | 51 + include/behaviortree_cpp/condition_node.h | 67 + include/behaviortree_cpp/contrib/any.hpp | 463 + include/behaviortree_cpp/contrib/expected.hpp | 2537 ++ include/behaviortree_cpp/contrib/json.hpp | 24640 ++++++++++++++++ .../behaviortree_cpp/contrib/magic_enum.hpp | 1531 + include/behaviortree_cpp/control_node.h | 62 + .../behaviortree_cpp/controls/fallback_node.h | 49 + .../controls/if_then_else_node.h | 49 + .../behaviortree_cpp/controls/manual_node.h | 58 + .../controls/parallel_all_node.h | 62 + .../behaviortree_cpp/controls/parallel_node.h | 83 + .../controls/reactive_fallback.h | 43 + .../controls/reactive_sequence.h | 49 + .../behaviortree_cpp/controls/sequence_node.h | 52 + .../controls/sequence_star_node.h | 50 + .../behaviortree_cpp/controls/switch_node.h | 135 + .../controls/while_do_else_node.h | 46 + include/behaviortree_cpp/decorator_node.h | 71 + .../decorators/consume_queue.h | 100 + .../behaviortree_cpp/decorators/delay_node.h | 59 + .../decorators/force_failure_node.h | 51 + .../decorators/force_success_node.h | 51 + .../decorators/inverter_node.h | 35 + .../keep_running_until_failure_node.h | 63 + .../behaviortree_cpp/decorators/loop_node.h | 137 + .../behaviortree_cpp/decorators/repeat_node.h | 63 + .../behaviortree_cpp/decorators/retry_node.h | 80 + .../decorators/run_once_node.h | 83 + .../decorators/script_precondition.h | 93 + .../decorators/subtree_node.h | 83 + .../decorators/timeout_node.h | 128 + include/behaviortree_cpp/exceptions.h | 71 + .../flatbuffers/BT_logger.fbs | 86 + .../flatbuffers/BT_logger_generated.h | 803 + .../behaviortree_cpp/flatbuffers/LICENSE.txt | 202 + include/behaviortree_cpp/flatbuffers/base.h | 437 + .../flatbuffers/bt_flatbuffer_helper.h | 162 + .../flatbuffers/flatbuffers.h | 3520 +++ .../flatbuffers/stl_emulation.h | 673 + include/behaviortree_cpp/json_export.h | 79 + include/behaviortree_cpp/leaf_node.h | 32 + .../loggers/abstract_logger.h | 96 + .../behaviortree_cpp/loggers/bt_cout_logger.h | 33 + .../behaviortree_cpp/loggers/bt_file_logger.h | 38 + .../loggers/bt_file_logger_v2.h | 67 + .../loggers/bt_minitrace_logger.h | 29 + .../behaviortree_cpp/loggers/bt_observer.h | 71 + .../loggers/bt_sqlite_logger.h | 75 + .../loggers/groot2_protocol.h | 247 + .../loggers/groot2_publisher.h | 81 + .../behaviortree_cpp/scripting/any_types.hpp | 131 + .../behaviortree_cpp/scripting/operators.hpp | 679 + .../scripting/script_parser.hpp | 50 + include/behaviortree_cpp/tree_node.h | 521 + .../behaviortree_cpp/utils/convert_impl.hpp | 158 + .../behaviortree_cpp/utils/demangle_util.h | 130 + .../utils/locked_reference.hpp | 75 + include/behaviortree_cpp/utils/platform.hpp | 119 + include/behaviortree_cpp/utils/safe_any.hpp | 330 + .../behaviortree_cpp/utils/shared_library.h | 143 + include/behaviortree_cpp/utils/signal.h | 49 + .../behaviortree_cpp/utils/simple_string.hpp | 166 + include/behaviortree_cpp/utils/strcat.hpp | 117 + include/behaviortree_cpp/utils/timer_queue.h | 263 + .../behaviortree_cpp/utils/wakeup_signal.hpp | 44 + include/behaviortree_cpp/xml_parsing.h | 79 + main.cpp | 74 +- 89 files changed, 46376 insertions(+), 18 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 build/.cmake/api/v1/query/client-vscode/query.json create mode 100644 build/CMakeCache.txt create mode 100644 build/CMakeFiles/3.22.1/CMakeSystem.cmake create mode 100644 build/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId.cpp create mode 100644 build/CMakeFiles/CMakeError.log create mode 100644 build/CMakeFiles/CMakeOutput.log create mode 100644 build/CMakeFiles/cmake.check_cache create mode 100644 include/behaviortree_cpp/action_node.h create mode 100644 include/behaviortree_cpp/actions/always_failure_node.h create mode 100644 include/behaviortree_cpp/actions/always_success_node.h create mode 100644 include/behaviortree_cpp/actions/pop_from_queue.hpp create mode 100644 include/behaviortree_cpp/actions/script_condition.h create mode 100644 include/behaviortree_cpp/actions/script_node.h create mode 100644 include/behaviortree_cpp/actions/set_blackboard_node.h create mode 100644 include/behaviortree_cpp/actions/sleep_node.h create mode 100644 include/behaviortree_cpp/actions/test_node.h create mode 100644 include/behaviortree_cpp/basic_types.h create mode 100644 include/behaviortree_cpp/behavior_tree.h create mode 100644 include/behaviortree_cpp/blackboard.h create mode 100644 include/behaviortree_cpp/bt_factory.h create mode 100644 include/behaviortree_cpp/bt_parser.h create mode 100644 include/behaviortree_cpp/condition_node.h create mode 100644 include/behaviortree_cpp/contrib/any.hpp create mode 100644 include/behaviortree_cpp/contrib/expected.hpp create mode 100644 include/behaviortree_cpp/contrib/json.hpp create mode 100644 include/behaviortree_cpp/contrib/magic_enum.hpp create mode 100644 include/behaviortree_cpp/control_node.h create mode 100644 include/behaviortree_cpp/controls/fallback_node.h create mode 100644 include/behaviortree_cpp/controls/if_then_else_node.h create mode 100644 include/behaviortree_cpp/controls/manual_node.h create mode 100644 include/behaviortree_cpp/controls/parallel_all_node.h create mode 100644 include/behaviortree_cpp/controls/parallel_node.h create mode 100644 include/behaviortree_cpp/controls/reactive_fallback.h create mode 100644 include/behaviortree_cpp/controls/reactive_sequence.h create mode 100644 include/behaviortree_cpp/controls/sequence_node.h create mode 100644 include/behaviortree_cpp/controls/sequence_star_node.h create mode 100644 include/behaviortree_cpp/controls/switch_node.h create mode 100644 include/behaviortree_cpp/controls/while_do_else_node.h create mode 100644 include/behaviortree_cpp/decorator_node.h create mode 100644 include/behaviortree_cpp/decorators/consume_queue.h create mode 100644 include/behaviortree_cpp/decorators/delay_node.h create mode 100644 include/behaviortree_cpp/decorators/force_failure_node.h create mode 100644 include/behaviortree_cpp/decorators/force_success_node.h create mode 100644 include/behaviortree_cpp/decorators/inverter_node.h create mode 100644 include/behaviortree_cpp/decorators/keep_running_until_failure_node.h create mode 100644 include/behaviortree_cpp/decorators/loop_node.h create mode 100644 include/behaviortree_cpp/decorators/repeat_node.h create mode 100644 include/behaviortree_cpp/decorators/retry_node.h create mode 100644 include/behaviortree_cpp/decorators/run_once_node.h create mode 100644 include/behaviortree_cpp/decorators/script_precondition.h create mode 100644 include/behaviortree_cpp/decorators/subtree_node.h create mode 100644 include/behaviortree_cpp/decorators/timeout_node.h create mode 100644 include/behaviortree_cpp/exceptions.h create mode 100644 include/behaviortree_cpp/flatbuffers/BT_logger.fbs create mode 100644 include/behaviortree_cpp/flatbuffers/BT_logger_generated.h create mode 100644 include/behaviortree_cpp/flatbuffers/LICENSE.txt create mode 100644 include/behaviortree_cpp/flatbuffers/base.h create mode 100644 include/behaviortree_cpp/flatbuffers/bt_flatbuffer_helper.h create mode 100644 include/behaviortree_cpp/flatbuffers/flatbuffers.h create mode 100644 include/behaviortree_cpp/flatbuffers/stl_emulation.h create mode 100644 include/behaviortree_cpp/json_export.h create mode 100644 include/behaviortree_cpp/leaf_node.h create mode 100644 include/behaviortree_cpp/loggers/abstract_logger.h create mode 100644 include/behaviortree_cpp/loggers/bt_cout_logger.h create mode 100644 include/behaviortree_cpp/loggers/bt_file_logger.h create mode 100644 include/behaviortree_cpp/loggers/bt_file_logger_v2.h create mode 100644 include/behaviortree_cpp/loggers/bt_minitrace_logger.h create mode 100644 include/behaviortree_cpp/loggers/bt_observer.h create mode 100644 include/behaviortree_cpp/loggers/bt_sqlite_logger.h create mode 100644 include/behaviortree_cpp/loggers/groot2_protocol.h create mode 100644 include/behaviortree_cpp/loggers/groot2_publisher.h create mode 100644 include/behaviortree_cpp/scripting/any_types.hpp create mode 100644 include/behaviortree_cpp/scripting/operators.hpp create mode 100644 include/behaviortree_cpp/scripting/script_parser.hpp create mode 100644 include/behaviortree_cpp/tree_node.h create mode 100644 include/behaviortree_cpp/utils/convert_impl.hpp create mode 100644 include/behaviortree_cpp/utils/demangle_util.h create mode 100644 include/behaviortree_cpp/utils/locked_reference.hpp create mode 100644 include/behaviortree_cpp/utils/platform.hpp create mode 100644 include/behaviortree_cpp/utils/safe_any.hpp create mode 100644 include/behaviortree_cpp/utils/shared_library.h create mode 100644 include/behaviortree_cpp/utils/signal.h create mode 100644 include/behaviortree_cpp/utils/simple_string.hpp create mode 100644 include/behaviortree_cpp/utils/strcat.hpp create mode 100644 include/behaviortree_cpp/utils/timer_queue.h create mode 100644 include/behaviortree_cpp/utils/wakeup_signal.hpp create mode 100644 include/behaviortree_cpp/xml_parsing.h diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/build/.cmake/api/v1/query/client-vscode/query.json b/build/.cmake/api/v1/query/client-vscode/query.json new file mode 100644 index 0000000..82bb964 --- /dev/null +++ b/build/.cmake/api/v1/query/client-vscode/query.json @@ -0,0 +1 @@ +{"requests":[{"kind":"cache","version":2},{"kind":"codemodel","version":2},{"kind":"toolchains","version":1},{"kind":"cmakeFiles","version":1}]} \ No newline at end of file diff --git a/build/CMakeCache.txt b/build/CMakeCache.txt new file mode 100644 index 0000000..d686b3e --- /dev/null +++ b/build/CMakeCache.txt @@ -0,0 +1,331 @@ +# This is the CMakeCache file. +# For build in directory: /Users/jerryzhou/Downloads/btcpp_sample/build +# It was generated by CMake: /usr/local/Cellar/cmake/3.22.1/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=CMAKE_ADDR2LINE-NOTFOUND + +//Path to a program. +CMAKE_AR:FILEPATH=/opt/local/bin/ar + +//No help, variable specified on the command line. +CMAKE_BUILD_TYPE:STRING=Debug + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//CXX compiler +CMAKE_CXX_COMPILER:STRING=/usr/local/bin/g++-12 + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING= + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING= + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING= + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING= + +//No help, variable specified on the command line. +CMAKE_C_COMPILER:FILEPATH=/usr/local/bin/gcc-12 + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//No help, variable specified on the command line. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE + +//Path to a program. +CMAKE_INSTALL_NAME_TOOL:FILEPATH=/opt/local/bin/install_name_tool + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/opt/local/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/opt/local/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=CMAKE_OBJCOPY-NOTFOUND + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Build architectures for OSX +CMAKE_OSX_ARCHITECTURES:STRING= + +//Minimum OS X version to target for deployment (at runtime); newer +// APIs weak linked. Set to empty string for default value. +CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 + +//The product will be built against the headers and libraries located +// inside the indicated SDK. +CMAKE_OSX_SYSROOT:PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=btcpp_sample + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/opt/local/bin/ranlib + +//Path to a program. +CMAKE_READELF:FILEPATH=CMAKE_READELF-NOTFOUND + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/opt/local/bin/strip + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Value Computed by CMake +btcpp_sample_BINARY_DIR:STATIC=/Users/jerryzhou/Downloads/btcpp_sample/build + +//Value Computed by CMake +btcpp_sample_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +btcpp_sample_SOURCE_DIR:STATIC=/Users/jerryzhou/Downloads/btcpp_sample + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/Users/jerryzhou/Downloads/btcpp_sample/build +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=22 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.22.1/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.22.1/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.22.1/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Path to cache edit program executable. +CMAKE_EDIT_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.22.1/bin/ccmake +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/Users/jerryzhou/Downloads/btcpp_sample +//ADVANCED property for variable: CMAKE_INSTALL_NAME_TOOL +CMAKE_INSTALL_NAME_TOOL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/local/Cellar/cmake/3.22.1/share/cmake +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/usr/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git a/build/CMakeFiles/3.22.1/CMakeSystem.cmake b/build/CMakeFiles/3.22.1/CMakeSystem.cmake new file mode 100644 index 0000000..f4feaf1 --- /dev/null +++ b/build/CMakeFiles/3.22.1/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Darwin-19.6.0") +set(CMAKE_HOST_SYSTEM_NAME "Darwin") +set(CMAKE_HOST_SYSTEM_VERSION "19.6.0") +set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") + + + +set(CMAKE_SYSTEM "Darwin-19.6.0") +set(CMAKE_SYSTEM_NAME "Darwin") +set(CMAKE_SYSTEM_VERSION "19.6.0") +set(CMAKE_SYSTEM_PROCESSOR "x86_64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/build/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId.cpp b/build/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000..25c62a8 --- /dev/null +++ b/build/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,791 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) || defined(__GNUG__) +# define COMPILER_ID "GNU" +# if defined(__GNUC__) +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# else +# define COMPILER_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# define CXX_STD _MSVC_LANG +#else +# define CXX_STD __cplusplus +#endif + +const char* info_language_standard_default = "INFO" ":" "standard_default[" +#if CXX_STD > 202002L + "23" +#elif CXX_STD > 201703L + "20" +#elif CXX_STD >= 201703L + "17" +#elif CXX_STD >= 201402L + "14" +#elif CXX_STD >= 201103L + "11" +#else + "98" +#endif +"]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */ +#if (defined(__clang__) || defined(__GNUC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) && !defined(_MSC_VER) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} diff --git a/build/CMakeFiles/CMakeError.log b/build/CMakeFiles/CMakeError.log new file mode 100644 index 0000000..8decadd --- /dev/null +++ b/build/CMakeFiles/CMakeError.log @@ -0,0 +1,2142 @@ +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_42f75/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_42f75.dir/build.make CMakeFiles/cmTC_42f75.dir/build +Building CXX object CMakeFiles/cmTC_42f75.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_42f75.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_42f75.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_42f75/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_9b543/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_9b543.dir/build.make CMakeFiles/cmTC_9b543.dir/build +Building CXX object CMakeFiles/cmTC_9b543.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_9b543.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_9b543.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_9b543/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_05e74/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_05e74.dir/build.make CMakeFiles/cmTC_05e74.dir/build +Building CXX object CMakeFiles/cmTC_05e74.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_05e74.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_05e74.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_05e74/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_c018d/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_c018d.dir/build.make CMakeFiles/cmTC_c018d.dir/build +Building CXX object CMakeFiles/cmTC_c018d.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_c018d.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_c018d.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_c018d/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_00e90/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_00e90.dir/build.make CMakeFiles/cmTC_00e90.dir/build +Building CXX object CMakeFiles/cmTC_00e90.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_00e90.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_00e90.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_00e90/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_11180/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_11180.dir/build.make CMakeFiles/cmTC_11180.dir/build +Building CXX object CMakeFiles/cmTC_11180.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_11180.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_11180.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_11180/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_2046e/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_2046e.dir/build.make CMakeFiles/cmTC_2046e.dir/build +Building CXX object CMakeFiles/cmTC_2046e.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_2046e.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_2046e.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_2046e/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_d6067/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_d6067.dir/build.make CMakeFiles/cmTC_d6067.dir/build +Building CXX object CMakeFiles/cmTC_d6067.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_d6067.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_d6067.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_d6067/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_bfe3f/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_bfe3f.dir/build.make CMakeFiles/cmTC_bfe3f.dir/build +Building CXX object CMakeFiles/cmTC_bfe3f.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_bfe3f.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_bfe3f.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_bfe3f/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_7756c/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_7756c.dir/build.make CMakeFiles/cmTC_7756c.dir/build +Building CXX object CMakeFiles/cmTC_7756c.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_7756c.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_7756c.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_7756c/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_ca521/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_ca521.dir/build.make CMakeFiles/cmTC_ca521.dir/build +Building CXX object CMakeFiles/cmTC_ca521.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_ca521.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_ca521.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_ca521/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_cc51a/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_cc51a.dir/build.make CMakeFiles/cmTC_cc51a.dir/build +Building CXX object CMakeFiles/cmTC_cc51a.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_cc51a.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_cc51a.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_cc51a/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_d0be6/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_d0be6.dir/build.make CMakeFiles/cmTC_d0be6.dir/build +Building CXX object CMakeFiles/cmTC_d0be6.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_d0be6.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_d0be6.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_d0be6/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_6464d/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_6464d.dir/build.make CMakeFiles/cmTC_6464d.dir/build +Building CXX object CMakeFiles/cmTC_6464d.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_6464d.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_6464d.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_6464d/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_2a1a1/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_2a1a1.dir/build.make CMakeFiles/cmTC_2a1a1.dir/build +Building CXX object CMakeFiles/cmTC_2a1a1.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_2a1a1.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_2a1a1.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_2a1a1/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_5daf1/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_5daf1.dir/build.make CMakeFiles/cmTC_5daf1.dir/build +Building CXX object CMakeFiles/cmTC_5daf1.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_5daf1.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_5daf1.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_5daf1/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_0fa87/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_0fa87.dir/build.make CMakeFiles/cmTC_0fa87.dir/build +Building CXX object CMakeFiles/cmTC_0fa87.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_0fa87.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_0fa87.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_0fa87/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_92fb7/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_92fb7.dir/build.make CMakeFiles/cmTC_92fb7.dir/build +Building CXX object CMakeFiles/cmTC_92fb7.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_92fb7.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_92fb7.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_92fb7/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_db4d7/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_db4d7.dir/build.make CMakeFiles/cmTC_db4d7.dir/build +Building CXX object CMakeFiles/cmTC_db4d7.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_db4d7.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_db4d7.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_db4d7/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_f404a/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_f404a.dir/build.make CMakeFiles/cmTC_f404a.dir/build +Building CXX object CMakeFiles/cmTC_f404a.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_f404a.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_f404a.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_f404a/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_0107c/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_0107c.dir/build.make CMakeFiles/cmTC_0107c.dir/build +Building CXX object CMakeFiles/cmTC_0107c.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_0107c.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_0107c.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_0107c/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_da3d4/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_da3d4.dir/build.make CMakeFiles/cmTC_da3d4.dir/build +Building CXX object CMakeFiles/cmTC_da3d4.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_da3d4.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_da3d4.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_da3d4/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_31cde/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_31cde.dir/build.make CMakeFiles/cmTC_31cde.dir/build +Building CXX object CMakeFiles/cmTC_31cde.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_31cde.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_31cde.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_31cde/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_0d607/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_0d607.dir/build.make CMakeFiles/cmTC_0d607.dir/build +Building CXX object CMakeFiles/cmTC_0d607.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_0d607.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_0d607.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_0d607/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_97426/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_97426.dir/build.make CMakeFiles/cmTC_97426.dir/build +Building CXX object CMakeFiles/cmTC_97426.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_97426.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_97426.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_97426/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_89c95/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_89c95.dir/build.make CMakeFiles/cmTC_89c95.dir/build +Building CXX object CMakeFiles/cmTC_89c95.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_89c95.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_89c95.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_89c95/fast] Error 2 + + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --c++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--c++' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --ec++ + +The output was: +1 +g++-12: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'? + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 + +The output was: +1 +g++-12: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead +g++-12: error: unrecognized command-line option '--target=arm-arm-none-eabi' + + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. +Compiler: /usr/local/bin/g++-12 +Build flags: +Id flags: -c;-I__does_not_exist__ + +The output was: +1 +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! + + +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": +g++-12: fatal error: no input files +compilation terminated. +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_895e5/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_895e5.dir/build.make CMakeFiles/cmTC_895e5.dir/build +Building CXX object CMakeFiles/cmTC_895e5.dir/CMakeCXXCompilerABI.cpp.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_895e5.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeCXXCompilerABI.cpp +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_895e5.dir/CMakeCXXCompilerABI.cpp.o] Error 1 +make: *** [cmTC_895e5/fast] Error 2 + + + + +Determining if the CXX compiler works failed with the following output: +Change Dir: /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_4ed6d/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_4ed6d.dir/build.make CMakeFiles/cmTC_4ed6d.dir/build +Building CXX object CMakeFiles/cmTC_4ed6d.dir/testCXXCompiler.cxx.o +/usr/local/bin/g++-12 -o CMakeFiles/cmTC_4ed6d.dir/testCXXCompiler.cxx.o -c /Users/jerryzhou/Downloads/btcpp_sample/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag! +make[1]: *** [CMakeFiles/cmTC_4ed6d.dir/testCXXCompiler.cxx.o] Error 1 +make: *** [cmTC_4ed6d/fast] Error 2 + + + diff --git a/build/CMakeFiles/CMakeOutput.log b/build/CMakeFiles/CMakeOutput.log new file mode 100644 index 0000000..fe4e76e --- /dev/null +++ b/build/CMakeFiles/CMakeOutput.log @@ -0,0 +1 @@ +The system is: Darwin - 19.6.0 - x86_64 diff --git a/build/CMakeFiles/cmake.check_cache b/build/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000..3dccd73 --- /dev/null +++ b/build/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/include/behaviortree_cpp/action_node.h b/include/behaviortree_cpp/action_node.h new file mode 100644 index 0000000..3bfbef4 --- /dev/null +++ b/include/behaviortree_cpp/action_node.h @@ -0,0 +1,233 @@ +/* Copyright (C) 2015-2018 Michele Colledanchise - All Rights Reserved + * Copyright (C) 2018-2020 Davide Faconti, Eurecat - All Rights Reserved +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef BEHAVIORTREECORE_ACTIONNODE_H +#define BEHAVIORTREECORE_ACTIONNODE_H + +#include +#include +#include +#include + +#include "leaf_node.h" + +namespace BT +{ +// IMPORTANT: Actions which returned SUCCESS or FAILURE will not be ticked +// again unless resetStatus() is called first. +// Keep this in mind when writing your custom Control and Decorator nodes. + +/** + * @brief The ActionNodeBase is the base class to use to create any kind of action. + * A particular derived class is free to override executeTick() as needed. + * + */ +class ActionNodeBase : public LeafNode +{ +public: + ActionNodeBase(const std::string& name, const NodeConfig& config); + ~ActionNodeBase() override = default; + + virtual NodeType type() const override final + { + return NodeType::ACTION; + } +}; + +/** + * @brief The SyncActionNode is an ActionNode that + * explicitly prevents the status RUNNING and doesn't require + * an implementation of halt(). + */ +class SyncActionNode : public ActionNodeBase +{ +public: + SyncActionNode(const std::string& name, const NodeConfig& config); + ~SyncActionNode() override = default; + + /// throws if the derived class return RUNNING. + virtual NodeStatus executeTick() override; + + /// You don't need to override this + virtual void halt() override final + {} +}; + +/** + * @brief The SimpleActionNode provides an easy to use SyncActionNode. + * The user should simply provide a callback with this signature + * + * BT::NodeStatus functionName(TreeNode&) + * + * This avoids the hassle of inheriting from a ActionNode. + * + * Using lambdas or std::bind it is easy to pass a pointer to a method. + * SimpleActionNode is executed synchronously and does not support halting. + * NodeParameters aren't supported. + */ +class SimpleActionNode : public SyncActionNode +{ +public: + using TickFunctor = std::function; + + // You must provide the function to call when tick() is invoked + SimpleActionNode(const std::string& name, TickFunctor tick_functor, + const NodeConfig& config); + + ~SimpleActionNode() override = default; + +protected: + virtual NodeStatus tick() override final; + + TickFunctor tick_functor_; +}; + +/** + * @brief The ThreadedAction executes the tick in a different thread. + * + * IMPORTANT: this action is quite hard to implement correctly. + * Please make sure that you know what you are doing. + * + * - In your overriden tick() method, you must check periodically + * the result of the method isHaltRequested() and stop your execution accordingly. + * + * - in the overriden halt() method, you can do some cleanup, but do not forget to + * invoke the base class method ThreadedAction::halt(); + * + * - remember, with few exceptions, a halted ThreadedAction must return NodeStatus::IDLE. + * + * For a complete example, look at __AsyncActionTest__ in action_test_node.h in the folder test. + * + * NOTE: when the thread is completed, i.e. the tick() returns its status, + * a TreeNode::emitWakeUpSignal() will be called. + */ + +class ThreadedAction : public ActionNodeBase +{ +public: + ThreadedAction(const std::string& name, const NodeConfig& config) : + ActionNodeBase(name, config) + {} + + bool isHaltRequested() const + { + return halt_requested_.load(); + } + + // This method spawn a new thread. Do NOT remove the "final" keyword. + virtual NodeStatus executeTick() override final; + + virtual void halt() override; + +private: + std::exception_ptr exptr_; + std::atomic_bool halt_requested_; + std::future thread_handle_; + std::mutex mutex_; +}; + +#ifdef USE_BTCPP3_OLD_NAMES +using AsyncActionNode = ThreadedAction; +#endif + +/** + * @brief The StatefulActionNode is the preferred way to implement asynchronous Actions. + * It is actually easier to use correctly, when compared with ThreadedAction + * + * It is particularly useful when your code contains a request-reply pattern, + * i.e. when the actions sends an asynchronous request, then checks periodically + * if the reply has been received and, eventually, analyze the reply to determine + * if the result is SUCCESS or FAILURE. + * + * -) an action that was in IDLE state will call onStart() + * + * -) A RUNNING action will call onRunning() + * + * -) if halted, method onHalted() is invoked + */ +class StatefulActionNode : public ActionNodeBase +{ +public: + StatefulActionNode(const std::string& name, const NodeConfig& config) : + ActionNodeBase(name, config) + {} + + /// Method called once, when transitioning from the state IDLE. + /// If it returns RUNNING, this becomes an asynchronous node. + virtual NodeStatus onStart() = 0; + + /// method invoked when the action is already in the RUNNING state. + virtual NodeStatus onRunning() = 0; + + /// when the method halt() is called and the action is RUNNING, this method is invoked. + /// This is a convenient place todo a cleanup, if needed. + virtual void onHalted() = 0; + + bool isHaltRequested() const; + +protected: + // do not override this method + NodeStatus tick() override final; + // do not override this method + void halt() override final; + +private: + std::atomic_bool halt_requested_; +}; + +/** + * @brief The CoroActionNode class is an a good candidate for asynchronous actions + * which need to communicate with an external service using an async request/reply interface. + * + * It is up to the user to decide when to suspend execution of the Action and resume + * the parent node, invoking the method setStatusRunningAndYield(). + */ +class CoroActionNode : public ActionNodeBase +{ +public: + CoroActionNode(const std::string& name, const NodeConfig& config); + virtual ~CoroActionNode() override; + + /// Use this method to return RUNNING and temporary "pause" the Action. + void setStatusRunningAndYield(); + + // This method triggers the TickEngine. Do NOT remove the "final" keyword. + virtual NodeStatus executeTick() override final; + + // Used internally, but it needs to be public + void tickImpl(); + + /** You may want to override this method. But still, remember to call this + * implementation too. + * + * Example: + * + * void MyAction::halt() + * { + * // do your stuff here + * CoroActionNode::halt(); + * } + */ + void halt() override; + +protected: + struct Pimpl; // The Pimpl idiom + std::unique_ptr _p; + + void destroyCoroutine(); +}; + + +} // namespace BT + +#endif diff --git a/include/behaviortree_cpp/actions/always_failure_node.h b/include/behaviortree_cpp/actions/always_failure_node.h new file mode 100644 index 0000000..4e6ec2c --- /dev/null +++ b/include/behaviortree_cpp/actions/always_failure_node.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2018-2020 Davide Faconti, Eurecat - All Rights Reserved +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#pragma once + +#include "behaviortree_cpp/action_node.h" + +namespace BT +{ +/** + * Simple actions that always returns FAILURE. + */ +class AlwaysFailureNode : public SyncActionNode +{ +public: + AlwaysFailureNode(const std::string& name) : SyncActionNode(name, {}) + { + setRegistrationID("AlwaysFailure"); + } + +private: + virtual BT::NodeStatus tick() override + { + return NodeStatus::FAILURE; + } +}; +} // namespace BT diff --git a/include/behaviortree_cpp/actions/always_success_node.h b/include/behaviortree_cpp/actions/always_success_node.h new file mode 100644 index 0000000..d536d0e --- /dev/null +++ b/include/behaviortree_cpp/actions/always_success_node.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2018-2022 Davide Faconti, Eurecat - All Rights Reserved +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#pragma once + +#include "behaviortree_cpp/action_node.h" + +namespace BT +{ +/** + * Simple actions that always returns SUCCESS. + */ +class AlwaysSuccessNode : public SyncActionNode +{ +public: + AlwaysSuccessNode(const std::string& name) : SyncActionNode(name, {}) + { + setRegistrationID("AlwaysSuccess"); + } + +private: + virtual BT::NodeStatus tick() override + { + return NodeStatus::SUCCESS; + } +}; +} // namespace BT diff --git a/include/behaviortree_cpp/actions/pop_from_queue.hpp b/include/behaviortree_cpp/actions/pop_from_queue.hpp new file mode 100644 index 0000000..0201a92 --- /dev/null +++ b/include/behaviortree_cpp/actions/pop_from_queue.hpp @@ -0,0 +1,145 @@ +/* Copyright (C) 2022 Davide Faconti - All Rights Reserved +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#pragma once + +#include +#include +#include "behaviortree_cpp/action_node.h" +#include "behaviortree_cpp/decorator_node.h" + + +/** + * Template Action used in ex04_waypoints.cpp example. + * + * Its purpose is to do make it easy to create while loops wich consume the elements of a queue. + * + * Note that modifying the queue is not thread safe, therefore the action that creates the queue + * or push elements into it, must be Synchronous. + * + * When ticked, we pop_front from the "queue" and insert that value in "popped_item". + * Return FAILURE if the queue is empty, SUCCESS otherwise. + */ +namespace BT +{ + +template +struct ProtectedQueue +{ + std::list items; + std::mutex mtx; +}; + +/* + * Few words about why we represent the queue as std::shared_ptr: + * + * Since we will pop from the queue, the fact that the blackboard uses + * a value semantic is not very convenient, since it would oblige us to + * copy the entire std::list from the BB and than copy again a new one with one less element. + * + * We avoid this using reference semantic (wrapping the object in a shared_ptr). + * Unfortunately, remember that this makes our access to the list not thread-safe! + * This is the reason why we add a mutex to be used when modyfying the ProtectedQueue::items + * + * */ + + +template +class PopFromQueue : public SyncActionNode +{ + public: + PopFromQueue(const std::string& name, const NodeConfig& config) + : SyncActionNode(name, config) + { + } + + NodeStatus tick() override + { + std::shared_ptr> queue; + if( getInput("queue", queue) && queue ) + { + std::unique_lock lk(queue->mtx); + auto& items = queue->items; + + if( items.empty() ) + { + return NodeStatus::FAILURE; + } + else{ + T val = items.front(); + items.pop_front(); + setOutput("popped_item", val); + return NodeStatus::SUCCESS; + } + } + else{ + return NodeStatus::FAILURE; + } + } + + static PortsList providedPorts() + { + return { InputPort>>("queue"), + OutputPort("popped_item")}; + } +}; + +/** + * Get the size of a queue. Usefull is you want to write something like: + * + * + * + * + * + * + * + * + */ +template +class QueueSize : public SyncActionNode +{ + public: + QueueSize(const std::string& name, const NodeConfig& config) + : SyncActionNode(name, config) + { + } + + NodeStatus tick() override + { + std::shared_ptr> queue; + if( getInput("queue", queue) && queue ) + { + std::unique_lock lk(queue->mtx); + auto& items = queue->items; + + if( items.empty() ) + { + return NodeStatus::FAILURE; + } + else{ + setOutput("size", int(items.size()) ); + return NodeStatus::SUCCESS; + } + } + return NodeStatus::FAILURE; + } + + static PortsList providedPorts() + { + return { InputPort>>("queue"), + OutputPort("size")}; + } +}; + + +} + diff --git a/include/behaviortree_cpp/actions/script_condition.h b/include/behaviortree_cpp/actions/script_condition.h new file mode 100644 index 0000000..ed9bab7 --- /dev/null +++ b/include/behaviortree_cpp/actions/script_condition.h @@ -0,0 +1,78 @@ +/* Copyright (C) 2023 Davide Faconti - All Rights Reserved + * +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#pragma once + +#include "behaviortree_cpp/condition_node.h" +#include "behaviortree_cpp/scripting/script_parser.hpp" + +namespace BT +{ +/** + * @brief Execute a script, and if the result is true, return + * SUCCESS, FAILURE otherwise. + */ +class ScriptCondition : public ConditionNode +{ +public: + ScriptCondition(const std::string& name, const NodeConfig& config) : + ConditionNode(name, config) + { + setRegistrationID("ScriptCondition"); + loadExecutor(); + } + + static PortsList providedPorts() + { + return {InputPort("code", "Piece of code that can be parsed. Must return false or true")}; + } + +private: + virtual BT::NodeStatus tick() override + { + loadExecutor(); + + Ast::Environment env = {config().blackboard, config().enums}; + auto result = _executor(env); + return (result.cast()) ? + NodeStatus::SUCCESS : NodeStatus::FAILURE; + } + + void loadExecutor() + { + std::string script; + if (!getInput("code", script)) + { + throw RuntimeError("Missing port [code] in ScriptCondition"); + } + if (script == _script) + { + return; + } + auto executor = ParseScript(script); + if (!executor) + { + throw RuntimeError(executor.error()); + } + else + { + _executor = executor.value(); + _script = script; + } + } + + std::string _script; + ScriptFunction _executor; +}; + +} // namespace BT diff --git a/include/behaviortree_cpp/actions/script_node.h b/include/behaviortree_cpp/actions/script_node.h new file mode 100644 index 0000000..3ab0fe0 --- /dev/null +++ b/include/behaviortree_cpp/actions/script_node.h @@ -0,0 +1,76 @@ +/* Copyright (C) 2022 Davide Faconti - All Rights Reserved + * +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#pragma once + +#include "behaviortree_cpp/action_node.h" +#include "behaviortree_cpp/scripting/script_parser.hpp" + +namespace BT +{ +class ScriptNode : public SyncActionNode +{ +public: + ScriptNode(const std::string& name, const NodeConfig& config) : + SyncActionNode(name, config) + { + setRegistrationID("ScriptNode"); + + loadExecutor(); + } + + static PortsList providedPorts() + { + return {InputPort("code", "Piece of code that can be parsed")}; + } + +private: + virtual BT::NodeStatus tick() override + { + loadExecutor(); + if (_executor) + { + Ast::Environment env = {config().blackboard, config().enums}; + _executor(env); + } + return NodeStatus::SUCCESS; + } + + void loadExecutor() + { + std::string script; + if (!getInput("code", script)) + { + throw RuntimeError("Missing port [code] in Script"); + } + if (script == _script) + { + return; + } + auto executor = ParseScript(script); + if (!executor) + { + throw RuntimeError(executor.error()); + } + else + { + _executor = executor.value(); + _script = script; + } + } + + std::string _script; + ScriptFunction _executor; +}; + +} // namespace BT diff --git a/include/behaviortree_cpp/actions/set_blackboard_node.h b/include/behaviortree_cpp/actions/set_blackboard_node.h new file mode 100644 index 0000000..28818d4 --- /dev/null +++ b/include/behaviortree_cpp/actions/set_blackboard_node.h @@ -0,0 +1,66 @@ +/* Copyright (C) 2018-2020 Davide Faconti, Eurecat - All Rights Reserved +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef ACTION_SETBLACKBOARD_NODE_H +#define ACTION_SETBLACKBOARD_NODE_H + +#include "behaviortree_cpp/action_node.h" + +namespace BT +{ +/** + * @brief The SetBlackboard is action used to store a string + * into an entry of the Blackboard specified in "output_key". + * + * Example usage: + * + * + * + * Will store the string "42" in the entry with key "the_answer". + */ +class SetBlackboard : public SyncActionNode +{ +public: + SetBlackboard(const std::string& name, const NodeConfig& config) : + SyncActionNode(name, config) + { + setRegistrationID("SetBlackboard"); + } + + static PortsList providedPorts() + { + return {InputPort("value", "Value represented as a string. convertFromString must be " + "implemented."), + BidirectionalPort("output_key", "Name of the blackboard entry where the " + "value " + "should be written")}; + } + +private: + virtual BT::NodeStatus tick() override + { + std::string key, value; + if (!getInput("output_key", key)) + { + throw RuntimeError("missing port [output_key]"); + } + if (!getInput("value", value)) + { + throw RuntimeError("missing port [value]"); + } + setOutput("output_key", value); + return NodeStatus::SUCCESS; + } +}; +} // namespace BT + +#endif diff --git a/include/behaviortree_cpp/actions/sleep_node.h b/include/behaviortree_cpp/actions/sleep_node.h new file mode 100644 index 0000000..6706454 --- /dev/null +++ b/include/behaviortree_cpp/actions/sleep_node.h @@ -0,0 +1,45 @@ +#pragma once + +#include "behaviortree_cpp/action_node.h" +#include "behaviortree_cpp/utils/timer_queue.h" +#include + +namespace BT +{ +/** + * @brief Sleep for a certain amount of time. + * Consider also using the decorator + * + * + */ +class SleepNode : public StatefulActionNode +{ +public: + + SleepNode(const std::string& name, const NodeConfig& config); + + ~SleepNode() override + { + halt(); + } + + NodeStatus onStart() override; + + NodeStatus onRunning() override; + + void onHalted() override; + + static PortsList providedPorts() + { + return {InputPort("msec")}; + } + +private: + TimerQueue<> timer_; + uint64_t timer_id_; + + bool timer_waiting_; + std::mutex delay_mutex_; +}; + +} // namespace BT diff --git a/include/behaviortree_cpp/actions/test_node.h b/include/behaviortree_cpp/actions/test_node.h new file mode 100644 index 0000000..f410a27 --- /dev/null +++ b/include/behaviortree_cpp/actions/test_node.h @@ -0,0 +1,94 @@ +/* Copyright (C) 2022 Davide Faconti - All Rights Reserved + * +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#pragma once + +#include "behaviortree_cpp/action_node.h" +#include "behaviortree_cpp/utils/timer_queue.h" +#include "behaviortree_cpp/scripting/script_parser.hpp" + +namespace BT +{ + +struct TestNodeConfig +{ + /// status to return when the action is completed + NodeStatus return_status = NodeStatus::SUCCESS; + + /// script to execute when actions is completed + std::string post_script; + + /// if async_delay > 0, this action become asynchronous and wait this amount of time + std::chrono::milliseconds async_delay = std::chrono::milliseconds(0); + + /// C++ callback to execute at the beginning + std::function pre_func; + + /// C++ callback to execute at the end + std::function post_func; +}; + +/** + * @brief The TestNode is a Node that can be configure to: + * + * 1. Return a specific status (SUCCESS / FAILURE) + * 2. Execute a post condition script (unless halted) + * 3. Either complete immediately (synchronous action), or after a + * given period of time (asynchronous action) + * + * This behavior is changed by the parameters pased with TestNodeConfig. + * + * This particular node is created by the factory when TestNodeConfig is + * added as a substitution rule: + * + * TestNodeConfig test_config; + * // change fields of test_config + * factory.addSubstitutionRule(pattern, test_config); + * + * See tutorial 11 for more details. + */ +class TestNode : public BT::StatefulActionNode +{ +public: + TestNode(const std::string& name, const NodeConfig& config, + TestNodeConfig test_config = {}) : + StatefulActionNode(name, config), + _test_config(std::move(test_config)) + { + setRegistrationID("TestNode"); + } + + static PortsList providedPorts() + { + return {}; + } + + void setConfig(const TestNodeConfig& config); + +private: + + virtual NodeStatus onStart() override; + + virtual NodeStatus onRunning() override; + + virtual void onHalted() override; + + NodeStatus onCompleted(); + + TestNodeConfig _test_config; + ScriptFunction _executor; + TimerQueue<> _timer; + std::atomic_bool _completed; +}; + +} // namespace BT diff --git a/include/behaviortree_cpp/basic_types.h b/include/behaviortree_cpp/basic_types.h new file mode 100644 index 0000000..bf82d97 --- /dev/null +++ b/include/behaviortree_cpp/basic_types.h @@ -0,0 +1,428 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "behaviortree_cpp/utils/safe_any.hpp" +#include "behaviortree_cpp/exceptions.h" +#include "behaviortree_cpp/contrib/expected.hpp" + +namespace BT +{ +/// Enumerates the possible types of nodes +enum class NodeType +{ + UNDEFINED = 0, + ACTION, + CONDITION, + CONTROL, + DECORATOR, + SUBTREE +}; + +/// Enumerates the states every node can be in after execution during a particular +/// time step. +/// IMPORTANT: Your custom nodes should NEVER return IDLE. +enum class NodeStatus +{ + IDLE = 0, + RUNNING = 1, + SUCCESS = 2, + FAILURE = 3, + SKIPPED = 4, +}; + +inline bool isStatusActive(const NodeStatus& status) +{ + return status != NodeStatus::IDLE && status != NodeStatus::SKIPPED; +} + +inline bool isStatusCompleted(const NodeStatus& status) +{ + return status == NodeStatus::SUCCESS || status == NodeStatus::FAILURE; +} + +enum class PortDirection +{ + INPUT, + OUTPUT, + INOUT +}; + +using StringView = std::string_view; + +/** + * convertFromString is used to convert a string into a custom type. + * + * This function is invoked under the hood by TreeNode::getInput(), but only when the + * input port contains a string. + * + * If you have a custom type, you need to implement the corresponding template specialization. + */ +template [[nodiscard]] +inline T convertFromString(StringView /*str*/) +{ + auto type_name = BT::demangle(typeid(T)); + + std::cerr << "You (maybe indirectly) called BT::convertFromString() for type [" + << type_name << "], but I can't find the template specialization.\n" + << std::endl; + + throw LogicError(std::string("You didn't implement the template specialization of " + "convertFromString for this type: ") + + type_name); +} + +template <> [[nodiscard]] +std::string convertFromString(StringView str); + +template <> [[nodiscard]] +const char* convertFromString(StringView str); + +template <> [[nodiscard]] +int convertFromString(StringView str); + +template <> [[nodiscard]] +unsigned convertFromString(StringView str); + +template <> [[nodiscard]] +long convertFromString(StringView str); + +template <> [[nodiscard]] +unsigned long convertFromString(StringView str); + +template <> [[nodiscard]] +float convertFromString(StringView str); + +template <> [[nodiscard]] +double convertFromString(StringView str); + +// Integer numbers separated by the character ";" +template <> [[nodiscard]] +std::vector convertFromString>(StringView str); + +// Real numbers separated by the character ";" +template <> [[nodiscard]] +std::vector convertFromString>(StringView str); + +// This recognizes either 0/1, true/false, TRUE/FALSE +template <> [[nodiscard]] +bool convertFromString(StringView str); + +// Names with all capital letters +template <> [[nodiscard]] +NodeStatus convertFromString(StringView str); + +// Names with all capital letters +template <> [[nodiscard]] +NodeType convertFromString(StringView str); + +template <> [[nodiscard]] +PortDirection convertFromString(StringView str); + +using StringConverter = std::function; + +using StringConvertersMap = std::unordered_map; + +// helper function +template [[nodiscard]] +inline StringConverter GetAnyFromStringFunctor() +{ + if constexpr(std::is_constructible_v) + { + return [](StringView str) { return Any(str); }; + } + else { + return [](StringView str) { return Any(convertFromString(str)); }; + } +} + +template <> [[nodiscard]] +inline StringConverter GetAnyFromStringFunctor() +{ + return {}; +} + +//------------------------------------------------------------------ + +template [[nodiscard]] +std::string toStr(const T& value) +{ + if constexpr(!std::is_arithmetic_v) + { + throw LogicError( + StrCat("Function BT::toStr() not specialized for type [", + BT::demangle(typeid(T)), "],", + "Implement it consistently with BT::convertFromString(), " + "or provide at dummy version that returns an empty string.") + ); + } else { + return std::to_string(value); + } +} + +template <> [[nodiscard]] +std::string toStr(const bool& value); + +template <> [[nodiscard]] +std::string toStr(const std::string& value); + +template <> [[nodiscard]] +std::string toStr(const BT::NodeStatus& status); + +/** + * @brief toStr converts NodeStatus to string. Optionally colored. + */ +[[nodiscard]] +std::string toStr(BT::NodeStatus status, bool colored); + +std::ostream& operator<<(std::ostream& os, const BT::NodeStatus& status); + +template <> [[nodiscard]] +std::string toStr(const BT::NodeType& type); + +std::ostream& operator<<(std::ostream& os, const BT::NodeType& type); + +template <> [[nodiscard]] +std::string toStr(const BT::PortDirection& direction); + +std::ostream& operator<<(std::ostream& os, const BT::PortDirection& type); + +// Small utility, unless you want to use +[[nodiscard]] +std::vector splitString(const StringView& strToSplit, char delimeter); + +template +using enable_if = typename std::enable_if::type*; + +template +using enable_if_not = typename std::enable_if::type*; + +/** Usage: given a function/method like this: + * + * Expected getAnswer(); + * + * User code can check result and error message like this: + * + * auto res = getAnswer(); + * if( res ) + * { + * std::cout << "answer was: " << res.value() << std::endl; + * } + * else{ + * std::cerr << "failed to get the answer: " << res.error() << std::endl; + * } + * + * */ +template +using Expected = nonstd::expected; + +#ifdef USE_BTCPP3_OLD_NAMES +// note: we also use the name Optional instead of expected because it is more intuitive +// for users that are not up to date with "modern" C++ +template +using Optional = nonstd::expected; +#endif + +/** Usage: given a function/method like: + * + * Result DoSomething(); + * + * User code can check result and error message like this: + * + * auto res = DoSomething(); + * if( res ) + * { + * std::cout << "DoSomething() done " << std::endl; + * } + * else{ + * std::cerr << "DoSomething() failed with message: " << res.error() << std::endl; + * } + * + * */ +using Result = Expected; + +[[nodiscard]] +bool IsAllowedPortName(StringView str); + +class PortInfo +{ +public: + struct AnyTypeAllowed + { + }; + + PortInfo(PortDirection direction = PortDirection::INOUT) : + type_(direction), type_info_(typeid(AnyTypeAllowed)) + {} + + PortInfo(PortDirection direction, std::type_index type_info, StringConverter conv) : + type_(direction), type_info_(type_info), converter_(conv) + {} + + [[nodiscard]] PortDirection direction() const; + + [[nodiscard]] const std::type_index& type() const; + + [[nodiscard]] Any parseString(const char* str) const; + + [[nodiscard]] Any parseString(const std::string& str) const; + + template [[nodiscard]] + Any parseString(const T&) const + { + // avoid compilation errors + return {}; + } + + void setDescription(StringView description); + + template + void setDefaultValue(const T& default_value) { + default_value_ = Any(default_value); + try{ + default_value_str_ = BT::toStr(default_value); + } + catch(LogicError&) {} + } + + [[nodiscard]] const std::string& description() const; + + [[nodiscard]] const Any& defaultValue() const; + + [[nodiscard]] const std::string& defaultValueString() const; + + [[nodiscard]] bool isStronglyTyped() const + { + return type_info_ != typeid(AnyTypeAllowed); + } + + [[nodiscard]] const StringConverter& converter() const + { + return converter_; + } + +private: + PortDirection type_; + std::type_index type_info_; + StringConverter converter_; + std::string description_; + Any default_value_; + std::string default_value_str_; +}; + +template [[nodiscard]] +std::pair CreatePort(PortDirection direction, + StringView name, + StringView description = {}) +{ + auto sname = static_cast(name); + if (!IsAllowedPortName(sname)) + { + throw RuntimeError("The name of a port must not be `name` or `ID` " + "and must start with an alphabetic character. " + "Underscore is reserved."); + } + + std::pair out; + + if (std::is_same::value) + { + out = {sname, PortInfo(direction)}; + } + else + { + out = {sname, PortInfo(direction, typeid(T), GetAnyFromStringFunctor())}; + } + if (!description.empty()) + { + out.second.setDescription(description); + } + return out; +} + +//---------- +template [[nodiscard]] +inline std::pair InputPort(StringView name, + StringView description = {}) +{ + return CreatePort(PortDirection::INPUT, name, description); +} + +template [[nodiscard]] +inline std::pair OutputPort(StringView name, + StringView description = {}) +{ + return CreatePort(PortDirection::OUTPUT, name, description); +} + +template [[nodiscard]] +inline std::pair BidirectionalPort(StringView name, + StringView description = {}) +{ + return CreatePort(PortDirection::INOUT, name, description); +} +//---------- +template [[nodiscard]] +inline std::pair InputPort(StringView name, const T& default_value, + StringView description) +{ + auto out = CreatePort(PortDirection::INPUT, name, description); + out.second.setDefaultValue(default_value); + return out; +} + +template [[nodiscard]] +inline std::pair BidirectionalPort(StringView name, + const T& default_value, + StringView description) +{ + auto out = CreatePort(PortDirection::INOUT, name, description); + out.second.setDefaultValue(default_value); + return out; +} +//---------- + +using PortsList = std::unordered_map; + +template +struct has_static_method_providedPorts : std::false_type +{ +}; + +template +struct has_static_method_providedPorts< + T, typename std::enable_if< + std::is_same::value>::type> + : std::true_type +{ +}; + +template [[nodiscard]] +inline PortsList getProvidedPorts(enable_if> = nullptr) +{ + return T::providedPorts(); +} + +template [[nodiscard]] +inline PortsList + getProvidedPorts(enable_if_not> = nullptr) +{ + return {}; +} + +using TimePoint = std::chrono::high_resolution_clock::time_point; +using Duration = std::chrono::high_resolution_clock::duration; + +} // namespace BT + diff --git a/include/behaviortree_cpp/behavior_tree.h b/include/behaviortree_cpp/behavior_tree.h new file mode 100644 index 0000000..0760810 --- /dev/null +++ b/include/behaviortree_cpp/behavior_tree.h @@ -0,0 +1,102 @@ +/* Copyright (C) 2015-2018 Michele Colledanchise - All Rights Reserved + * Copyright (C) 2018-2023 Davide Faconti - All Rights Reserved +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#pragma once + +#include "behaviortree_cpp/controls/parallel_node.h" +#include "behaviortree_cpp/controls/parallel_all_node.h" +#include "behaviortree_cpp/controls/reactive_sequence.h" +#include "behaviortree_cpp/controls/reactive_fallback.h" +#include "behaviortree_cpp/controls/fallback_node.h" +#include "behaviortree_cpp/controls/sequence_node.h" +#include "behaviortree_cpp/controls/sequence_star_node.h" +#include "behaviortree_cpp/controls/switch_node.h" +#include "behaviortree_cpp/controls/if_then_else_node.h" +#include "behaviortree_cpp/controls/while_do_else_node.h" + +#include "behaviortree_cpp/action_node.h" +#include "behaviortree_cpp/condition_node.h" + +#include "behaviortree_cpp/decorators/inverter_node.h" +#include "behaviortree_cpp/decorators/retry_node.h" +#include "behaviortree_cpp/decorators/repeat_node.h" +#include "behaviortree_cpp/decorators/run_once_node.h" +#include "behaviortree_cpp/decorators/subtree_node.h" +#include "behaviortree_cpp/decorators/loop_node.h" + +#include "behaviortree_cpp/actions/always_success_node.h" +#include "behaviortree_cpp/actions/always_failure_node.h" +#include "behaviortree_cpp/actions/script_condition.h" +#include "behaviortree_cpp/actions/script_node.h" +#include "behaviortree_cpp/actions/set_blackboard_node.h" +#include "behaviortree_cpp/actions/test_node.h" +#include "behaviortree_cpp/actions/sleep_node.h" + +#include "behaviortree_cpp/decorators/force_success_node.h" +#include "behaviortree_cpp/decorators/force_failure_node.h" +#include "behaviortree_cpp/decorators/keep_running_until_failure_node.h" +#include "behaviortree_cpp/decorators/script_precondition.h" +#include "behaviortree_cpp/decorators/timeout_node.h" +#include "behaviortree_cpp/decorators/delay_node.h" + +#include + +namespace BT +{ +//Call the visitor for each node of the tree, given a root. +void applyRecursiveVisitor(const TreeNode* root_node, + const std::function& visitor); + +//Call the visitor for each node of the tree, given a root. +void applyRecursiveVisitor(TreeNode* root_node, + const std::function& visitor); + +/** + * Debug function to print the hierarchy of the tree. Prints to std::cout by default. + */ +void printTreeRecursively(const TreeNode* root_node, std::ostream& stream = std::cout); + +using SerializedTreeStatus = std::vector>; + +/** + * @brief buildSerializedStatusSnapshot can be used to create a buffer that can be stored + * (or sent to a client application) to know the status of all the nodes of a tree. + * It is not "human readable". + * + * @param root_node + * @param serialized_buffer is the output. + */ +void buildSerializedStatusSnapshot(const TreeNode* root_node, + SerializedTreeStatus& serialized_buffer); + +/// Simple way to extract the type of a TreeNode at COMPILE TIME. +/// Useful to avoid the cost of dynamic_cast or the virtual method TreeNode::type(). +template +inline NodeType getType() +{ + // clang-format off + if( std::is_base_of::value ) return NodeType::ACTION; + if( std::is_base_of::value ) return NodeType::CONDITION; + if( std::is_base_of::value ) return NodeType::SUBTREE; + if( std::is_base_of::value ) return NodeType::DECORATOR; + if( std::is_base_of::value ) return NodeType::CONTROL; + return NodeType::UNDEFINED; + // clang-format on +} + + +const char* LibraryVersionString(); + +int LibraryVersionNumber(); + +} // namespace BT diff --git a/include/behaviortree_cpp/blackboard.h b/include/behaviortree_cpp/blackboard.h new file mode 100644 index 0000000..9323a47 --- /dev/null +++ b/include/behaviortree_cpp/blackboard.h @@ -0,0 +1,216 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +#include "behaviortree_cpp/basic_types.h" +#include "behaviortree_cpp/utils/safe_any.hpp" +#include "behaviortree_cpp/exceptions.h" +#include "behaviortree_cpp/utils/locked_reference.hpp" + +namespace BT +{ + +/// This type contains a pointer to Any, protected +/// with a locked mutex as long as the object is in scope +using AnyPtrLocked = LockedPtr; + +/** + * @brief The Blackboard is the mechanism used by BehaviorTrees to exchange + * typed data. + */ +class Blackboard +{ + +public: + using Ptr = std::shared_ptr; + +protected: + // This is intentionally protected. Use Blackboard::create instead + Blackboard(Blackboard::Ptr parent) : parent_bb_(parent) + {} + +public: + + struct Entry + { + Any value; + PortInfo port_info; + mutable std::mutex entry_mutex; + + Entry(const PortInfo& info) : port_info(info) + {} + + Entry(Any&& other_any, const PortInfo& info) : + value(std::move(other_any)), port_info(info) + {} + }; + + /** Use this static method to create an instance of the BlackBoard + * to share among all your NodeTrees. + */ + static Blackboard::Ptr create(Blackboard::Ptr parent = {}) + { + return std::shared_ptr(new Blackboard(parent)); + } + + virtual ~Blackboard() = default; + + void enableAutoRemapping(bool remapping); + + [[nodiscard]] const std::shared_ptr getEntry(const std::string& key) const; + + [[nodiscard]] std::shared_ptr getEntry(const std::string& key); + + [[nodiscard]] AnyPtrLocked getAnyLocked(const std::string& key); + + [[nodiscard]] AnyPtrLocked getAnyLocked(const std::string& key) const; + + [[deprecated("Use getAnyLocked instead")]] + const Any* getAny(const std::string& key) const; + + [[deprecated("Use getAnyLocked instead")]] + Any* getAny(const std::string& key); + + /** Return true if the entry with the given key was found. + * Note that this method may throw an exception if the cast to T failed. + */ + template [[nodiscard]] + bool get(const std::string& key, T& value) const + { + if (auto any_ref = getAnyLocked(key)) + { + value = any_ref.get()->cast(); + return true; + } + return false; + } + + /** + * Version of get() that throws if it fails. + */ + template [[nodiscard]] + T get(const std::string& key) const + { + if (auto any_ref = getAnyLocked(key)) + { + const auto& any = any_ref.get(); + if(any->empty()) + { + throw RuntimeError("Blackboard::get() error. Entry [", key, "] hasn't been initialized, yet"); + } + return any_ref.get()->cast(); + } + else + { + throw RuntimeError("Blackboard::get() error. Missing key [", key, "]"); + } + } + + /// Update the entry with the given key + template + void set(const std::string& key, const T& value) + { + std::unique_lock lock(mutex_); + + // check local storage + auto it = storage_.find(key); + if (it == storage_.end()) + { + // create a new entry + Any new_value(value); + PortInfo new_port(PortDirection::INOUT, new_value.type(), + GetAnyFromStringFunctor()); + lock.unlock(); + auto entry = createEntryImpl(key, new_port); + lock.lock(); + storage_.insert( {key, entry} ); + entry->value = new_value; + } + else + { + // this is not the first time we set this entry, we need to check + // if the type is the same or not. + Entry& entry = *it->second; + std::scoped_lock lock(entry.entry_mutex); + + Any& previous_any = entry.value; + const PortInfo& port_info = entry.port_info; + + Any new_value(value); + + // special case: entry exists but it is not strongly typed... yet + if (!port_info.isStronglyTyped()) + { + // Use the new type to create a new entry that is strongly typed. + entry.port_info = + PortInfo(port_info.direction(), new_value.type(), port_info.converter()); + previous_any = std::move(new_value); + return; + } + + std::type_index previous_type = port_info.type(); + + // check type mismatch + if (previous_type != std::type_index(typeid(T)) && + previous_type != new_value.type()) + { + bool mismatching = true; + if (std::is_constructible::value) + { + Any any_from_string = port_info.parseString(value); + if (any_from_string.empty() == false) + { + mismatching = false; + new_value = std::move(any_from_string); + } + } + + if (mismatching) + { + debugMessage(); + + auto msg = StrCat("Blackboard entry [", key, "]: once declared, the type of a port" + " shall not change. Previously declared type [", BT::demangle(previous_type), + "], current type [", BT::demangle(typeid(T)), "]"); + throw LogicError(msg); + } + } + previous_any = std::move(new_value); + } + } + + [[nodiscard]] const PortInfo* portInfo(const std::string& key); + + void addSubtreeRemapping(StringView internal, StringView external); + + void debugMessage() const; + + [[nodiscard]] std::vector getKeys() const; + + void clear(); + + [[deprecated("Use getAnyLocked to access safely an Entry")]] + std::recursive_mutex& entryMutex() const; + + void createEntry(const std::string& key, const PortInfo& info); + +private: + mutable std::mutex mutex_; + mutable std::recursive_mutex entry_mutex_; + std::unordered_map> storage_; + std::weak_ptr parent_bb_; + std::unordered_map internal_to_external_; + + std::shared_ptr createEntryImpl(const std::string &key, const PortInfo& info); + + bool autoremapping_ = false; +}; + +} // namespace BT + diff --git a/include/behaviortree_cpp/bt_factory.h b/include/behaviortree_cpp/bt_factory.h new file mode 100644 index 0000000..a9ed755 --- /dev/null +++ b/include/behaviortree_cpp/bt_factory.h @@ -0,0 +1,502 @@ +/* Copyright (C) 2018 Michele Colledanchise - All Rights Reserved + * Copyright (C) 2018-2023 Davide Faconti - All Rights Reserved +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef BT_FACTORY_H +#define BT_FACTORY_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "behaviortree_cpp/contrib/magic_enum.hpp" +#include "behaviortree_cpp/behavior_tree.h" + +namespace BT +{ +/// The term "Builder" refers to the Builder Pattern (https://en.wikipedia.org/wiki/Builder_pattern) +using NodeBuilder = + std::function(const std::string&, const NodeConfig&)>; + +template +inline NodeBuilder CreateBuilder(Args... args) +{ + return [=](const std::string& name, const NodeConfig& config) { + return TreeNode::Instantiate(name, config, args...); + }; +} + +template +inline TreeNodeManifest CreateManifest(const std::string& ID, + PortsList portlist = getProvidedPorts()) +{ + return {getType(), ID, portlist, {}}; +} + +#ifdef BT_PLUGIN_EXPORT + +#if defined(_WIN32) + #define BTCPP_EXPORT extern "C" __declspec(dllexport) +#else + // Unix-like OSes + #define BTCPP_EXPORT extern "C" __attribute__ ((visibility ("default"))) +#endif + +#else + #define BTCPP_EXPORT static +#endif +/* Use this macro to automatically register one or more custom Nodes +* into a factory. For instance: +* +* BT_REGISTER_NODES(factory) +* { +* factory.registerNodeType("MoveBase"); +* } +* +* IMPORTANT: this function MUST be declared in a cpp file, NOT a header file. +* In your cake, you must add the definition [BT_PLUGIN_EXPORT] with: +* +* target_compile_definitions(my_plugin_target PRIVATE BT_PLUGIN_EXPORT ) + +* See examples in sample_nodes directory. +*/ + +#define BT_REGISTER_NODES(factory) \ + BTCPP_EXPORT void BT_RegisterNodesFromPlugin(BT::BehaviorTreeFactory& factory) + +constexpr const char* PLUGIN_SYMBOL = "BT_RegisterNodesFromPlugin"; + +bool WildcardMatch(const std::string &str, StringView filter); + +/** + * @brief Struct used to store a tree. + * If this object goes out of scope, the tree is destroyed. + */ +class Tree +{ +public: + // a tree can contain multiple subtree. + struct Subtree + { + using Ptr = std::shared_ptr; + std::vector nodes; + Blackboard::Ptr blackboard; + std::string instance_name; + std::string tree_ID; + }; + + std::vector subtrees; + std::unordered_map manifests; + + Tree(); + + Tree(const Tree&) = delete; + Tree& operator=(const Tree&) = delete; + + Tree(Tree&& other); + Tree& operator=(Tree&& other); + + void initialize(); + + void haltTree(); + + [[nodiscard]] TreeNode* rootNode() const; + + /// Sleep for a certain amount of time. + /// This sleep could be interrupted by the method + /// TreeNode::emitWakeUpSignal() + void sleep(std::chrono::system_clock::duration timeout); + + ~Tree(); + + /// Tick the root of the tree once, even if a node invoked + /// emitWakeUpSignal() + NodeStatus tickExactlyOnce(); + + /** + * @brief by default, tickOnce() sends a single tick, BUT + * as long as there is at least one node of the tree + * invoking TreeNode::emitWakeUpSignal(), it will be ticked again. + */ + NodeStatus tickOnce(); + + /// Call tickOnce until the status is different from RUNNING. + /// Note that between one tick and the following one, + /// a Tree::sleep() is used + NodeStatus + tickWhileRunning(std::chrono::milliseconds sleep_time = std::chrono::milliseconds(10)); + + [[nodiscard]] Blackboard::Ptr rootBlackboard(); + + //Call the visitor for each node of the tree. + void applyVisitor(const std::function& visitor); + + //Call the visitor for each node of the tree. + void applyVisitor(const std::function& visitor); + + [[nodiscard]] uint16_t getUID(); + + /// Get a list of nodes which fullPath() match a wildcard filter and + /// a given path. Example: + /// + /// move_nodes = tree.getNodesByPath("move_*"); + /// + template [[nodiscard]] + std::vector getNodesByPath(StringView wildcard_filter) { + std::vector nodes; + for (auto const& subtree : subtrees) { + for (auto const& node : subtree->nodes) { + if(auto node_recast = dynamic_cast(node.get())) { + if(WildcardMatch(node->fullPath(), wildcard_filter)) { + nodes.push_back(node.get()); + } + } + } + } + return nodes; + } + + +private: + std::shared_ptr wake_up_; + + enum TickOption + { + EXACTLY_ONCE, + ONCE_UNLESS_WOKEN_UP, + WHILE_RUNNING + }; + + NodeStatus tickRoot(TickOption opt, std::chrono::milliseconds sleep_time); + + uint16_t uid_counter_ = 0; +}; + +class Parser; + +/** + * @brief The BehaviorTreeFactory is used to create instances of a + * TreeNode at run-time. + * + * Some node types are "builtin", whilst other are used defined and need + * to be registered using a unique ID. + */ +class BehaviorTreeFactory +{ +public: + BehaviorTreeFactory(); + ~BehaviorTreeFactory(); + + BehaviorTreeFactory(const BehaviorTreeFactory& other) = delete; + BehaviorTreeFactory& operator=(const BehaviorTreeFactory& other) = delete; + + BehaviorTreeFactory(BehaviorTreeFactory&& other) = default; + BehaviorTreeFactory& operator=(BehaviorTreeFactory&& other) = default; + + /// Remove a registered ID. + bool unregisterBuilder(const std::string& ID); + + /** The most generic way to register a NodeBuilder. + * + * Throws if you try to register twice a builder with the same + * registration_ID. + */ + void registerBuilder(const TreeNodeManifest& manifest, const NodeBuilder& builder); + + template + void registerBuilder(const std::string& ID, const NodeBuilder& builder) + { + auto manifest = CreateManifest(ID); + registerBuilder(manifest, builder); + } + + /** + * @brief registerSimpleAction help you register nodes of type SimpleActionNode. + * + * @param ID registration ID + * @param tick_functor the callback to be invoked in the tick() method. + * @param ports if your SimpleNode requires ports, provide the list here. + * + * */ + void registerSimpleAction(const std::string& ID, + const SimpleActionNode::TickFunctor& tick_functor, + PortsList ports = {}); + /** + * @brief registerSimpleCondition help you register nodes of type SimpleConditionNode. + * + * @param ID registration ID + * @param tick_functor the callback to be invoked in the tick() method. + * @param ports if your SimpleNode requires ports, provide the list here. + * + * */ + void registerSimpleCondition(const std::string& ID, + const SimpleConditionNode::TickFunctor& tick_functor, + PortsList ports = {}); + /** + * @brief registerSimpleDecorator help you register nodes of type SimpleDecoratorNode. + * + * @param ID registration ID + * @param tick_functor the callback to be invoked in the tick() method. + * @param ports if your SimpleNode requires ports, provide the list here. + * + * */ + void registerSimpleDecorator(const std::string& ID, + const SimpleDecoratorNode::TickFunctor& tick_functor, + PortsList ports = {}); + + /** + * @brief registerFromPlugin load a shared library and execute the function BT_REGISTER_NODES (see macro). + * + * @param file_path path of the file + */ + void registerFromPlugin(const std::string& file_path); + + /** + * @brief registerFromROSPlugins finds all shared libraries that export ROS plugins for behaviortree_cpp, and calls registerFromPlugin for each library. + * @throws If not compiled with ROS support or if the library cannot load for any reason + * + */ + void registerFromROSPlugins(); + + /** + * @brief registerBehaviorTreeFromFile. + * Load the definition of an entire behavior tree, but don't instantiate it. + * You can instantiate it later with: + * + * BehaviorTreeFactory::createTree(tree_id) + * + * where "tree_id" come from the XML attribute + * + */ + void registerBehaviorTreeFromFile(const std::filesystem::path& filename); + + /// Same of registerBehaviorTreeFromFile, but passing the XML text, + /// instead of the filename. + void registerBehaviorTreeFromText(const std::string& xml_text); + + /// Returns the ID of the trees registered either with + /// registerBehaviorTreeFromFile or registerBehaviorTreeFromText. + [[nodiscard]] + std::vector registeredBehaviorTrees() const; + + /** + * @brief Clear previously-registered behavior trees. + */ + void clearRegisteredBehaviorTrees(); + + /** + * @brief instantiateTreeNode creates an instance of a previously registered TreeNode. + * + * @param name name of this particular instance + * @param ID ID used when it was registered + * @param config configuration that is passed to the constructor of the TreeNode. + * @return new node. + */ + [[nodiscard]] + std::unique_ptr instantiateTreeNode(const std::string& name, + const std::string& ID, + const NodeConfig& config) const; + + /** registerNodeType where you explicitly pass the list of ports. + * Doesn't require the implementation of static method providedPorts() + */ + template + void registerNodeType(const std::string& ID, const PortsList& ports, ExtraArgs... args) + { + static_assert(std::is_base_of::value || + std::is_base_of::value || + std::is_base_of::value || + std::is_base_of::value, + "[registerNode]: accepts only classed derived from either " + "ActionNodeBase, " + "DecoratorNode, ControlNode or ConditionNode"); + + constexpr bool default_constructable = + std::is_constructible::value; + constexpr bool param_constructable = + std::is_constructible::value; + + // clang-format off + static_assert(!std::is_abstract::value, + "[registerNode]: Some methods are pure virtual. " + "Did you override the methods tick() and halt()?"); + + static_assert(default_constructable || param_constructable, + "[registerNode]: the registered class must have at least one of these two constructors:\n" + " (const std::string&, const NodeConfig&) or (const std::string&)\n" + "Check also if the constructor is public!)"); + // clang-format on + + registerBuilder(CreateManifest(ID, ports), CreateBuilder(args...)); + } + + /** registerNodeType is the method to use to register your custom TreeNode. + * + * It accepts only classed derived from either ActionNodeBase, DecoratorNode, + * ControlNode or ConditionNode. + */ + template + void registerNodeType(const std::string& ID, ExtraArgs... args) + { + // check first if the given class is abstract + static_assert(!std::is_abstract_v, "The given type can't be abstract"); + + constexpr bool param_constructable = + std::is_constructible::value; + constexpr bool has_static_ports_list = has_static_method_providedPorts::value; + + // clang-format off + static_assert(!(param_constructable && !has_static_ports_list), + "[registerNode]: you MUST implement the static method:\n" + " PortsList providedPorts();\n"); + + static_assert(!(has_static_ports_list && !param_constructable), + "[registerNode]: since you have a static method providedPorts(),\n" + "you MUST add a constructor with signature:\n" + "(const std::string&, const NodeParameters&)\n"); + // clang-format on + registerNodeType(ID, getProvidedPorts(), args...); + } + + /// All the builders. Made available mostly for debug purposes. + [[nodiscard]] + const std::unordered_map& builders() const; + + /// Manifests of all the registered TreeNodes. + [[nodiscard]] + const std::unordered_map& manifests() const; + + /// List of builtin IDs. + [[nodiscard]] + const std::set& builtinNodes() const; + + /** + * @brief createTreeFromText will parse the XML directly from string. + * The XML needs to contain either a single or specify + * the attribute [main_tree_to_execute]. + * + * Consider using instead registerBehaviorTreeFromText() and createTree(). + * + * @param text string containing the XML + * @param blackboard blackboard of the root tree + * @return the newly created tree + */ + [[nodiscard]] + Tree createTreeFromText(const std::string& text, + Blackboard::Ptr blackboard = Blackboard::create()); + + /** + * @brief createTreeFromFile will parse the XML from a given file. + * The XML needs to contain either a single or specify + * the attribute [main_tree_to_execute]. + * + * Consider using instead registerBehaviorTreeFromFile() and createTree(). + * + * @param file_path location of the file to load + * @param blackboard blackboard of the root tree + * @return the newly created tree + */ + [[nodiscard]] + Tree createTreeFromFile(const std::filesystem::path& file_path, + Blackboard::Ptr blackboard = Blackboard::create()); + + [[nodiscard]] + Tree createTree(const std::string& tree_name, + Blackboard::Ptr blackboard = Blackboard::create()); + + /// Add a description to a specific manifest. This description will be added + /// to with the function writeTreeNodesModelXML() + void addDescriptionToManifest(const std::string& node_id, + const std::string& description); + + /** + * @brief Add an Enum to the scripting language. + * For instance if you do: + * + * registerScriptingEnum("THE_ANSWER", 42), + * + * You may type this in your scripts: + * + *