[YAML Parser] Depend on rcutils only (#470)
* Make rcl_yaml_param_parser depend on rcutils only. Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com> * Address peer review comments. Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
This commit is contained in:
parent
21ff57b14b
commit
f9ceef5c86
4 changed files with 325 additions and 332 deletions
|
@ -4,7 +4,6 @@ project(rcl_yaml_param_parser)
|
||||||
|
|
||||||
find_package(ament_cmake_ros REQUIRED)
|
find_package(ament_cmake_ros REQUIRED)
|
||||||
find_package(rcutils REQUIRED)
|
find_package(rcutils REQUIRED)
|
||||||
find_package(rcl REQUIRED)
|
|
||||||
find_package(libyaml_vendor REQUIRED)
|
find_package(libyaml_vendor REQUIRED)
|
||||||
find_package(yaml REQUIRED)
|
find_package(yaml REQUIRED)
|
||||||
|
|
||||||
|
@ -26,9 +25,18 @@ set(rcl_yaml_parser_sources
|
||||||
add_library(
|
add_library(
|
||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
${rcl_yaml_parser_sources})
|
${rcl_yaml_parser_sources})
|
||||||
ament_target_dependencies(${PROJECT_NAME} "yaml" "rcutils" "rcl")
|
ament_target_dependencies(${PROJECT_NAME} "yaml" "rcutils")
|
||||||
|
|
||||||
|
# Set the visibility to hidden by default if possible
|
||||||
|
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
|
# Set the visibility of symbols to hidden by default for gcc and clang
|
||||||
|
# (this is already the default on Windows)
|
||||||
|
set_target_properties(${PROJECT_NAME}
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_FLAGS "-fvisibility=hidden"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
rcl_set_symbol_visibility_hidden(${PROJECT_NAME} LANGUAGE "C")
|
|
||||||
# Causes the visibility macros to use dllexport rather than dllimport,
|
# Causes the visibility macros to use dllexport rather than dllimport,
|
||||||
# which is appropriate when building the dll but not consuming it.
|
# which is appropriate when building the dll but not consuming it.
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE "RCL_YAML_PARAM_PARSER_BUILDING_DLL")
|
target_compile_definitions(${PROJECT_NAME} PRIVATE "RCL_YAML_PARAM_PARSER_BUILDING_DLL")
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#ifndef RCL_YAML_PARAM_PARSER__TYPES_H_
|
#ifndef RCL_YAML_PARAM_PARSER__TYPES_H_
|
||||||
#define RCL_YAML_PARAM_PARSER__TYPES_H_
|
#define RCL_YAML_PARAM_PARSER__TYPES_H_
|
||||||
|
|
||||||
#include "rcl/allocator.h"
|
#include "rcutils/allocator.h"
|
||||||
#include "rcutils/types/string_array.h"
|
#include "rcutils/types/string_array.h"
|
||||||
|
|
||||||
/// \typedef rcl_bool_array_t
|
/// \typedef rcl_bool_array_t
|
||||||
|
@ -81,7 +81,7 @@ typedef struct rcl_params_s
|
||||||
char ** node_names; ///< List of names of the node
|
char ** node_names; ///< List of names of the node
|
||||||
rcl_node_params_t * params; ///< Array of parameters
|
rcl_node_params_t * params; ///< Array of parameters
|
||||||
size_t num_nodes; ///< Number of nodes
|
size_t num_nodes; ///< Number of nodes
|
||||||
rcl_allocator_t allocator; ///< Allocator used
|
rcutils_allocator_t allocator; ///< Allocator used
|
||||||
} rcl_params_t;
|
} rcl_params_t;
|
||||||
|
|
||||||
#endif // RCL_YAML_PARAM_PARSER__TYPES_H_
|
#endif // RCL_YAML_PARAM_PARSER__TYPES_H_
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<depend>libyaml_vendor</depend>
|
<depend>libyaml_vendor</depend>
|
||||||
<depend>yaml</depend>
|
<depend>yaml</depend>
|
||||||
<build_depend>rcutils</build_depend>
|
<build_depend>rcutils</build_depend>
|
||||||
<build_depend>rcl</build_depend>
|
|
||||||
|
|
||||||
<test_depend>ament_cmake_gtest</test_depend>
|
<test_depend>ament_cmake_gtest</test_depend>
|
||||||
<test_depend>ament_lint_common</test_depend>
|
<test_depend>ament_lint_common</test_depend>
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue