Skip to content

Commit

Permalink
Use set() instead of list(APPEND to make a list
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
  • Loading branch information
sloretz committed Mar 16, 2022
1 parent 0f59e02 commit 2fe9d3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ target_compile_definitions(${rosidl_generate_interfaces_TARGET}${_target_suffix}
PRIVATE "ROSIDL_TYPESUPPORT_FASTRTPS_C_BUILDING_DLL_${PROJECT_NAME}")

if(NOT WIN32)
list(APPEND _target_compile_flags -Wall -Wextra -Wpedantic)
set(_target_compile_flags -Wall -Wextra -Wpedantic)
else()
list(APPEND _target_compile_flags /W4)
set(_target_compile_flags /W4)
endif()
target_compile_options(${rosidl_generate_interfaces_TARGET}${_target_suffix} PRIVATE ${_target_compile_flags})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ target_compile_definitions(${rosidl_generate_interfaces_TARGET}${_target_suffix}

# Set compiler flags
if(NOT WIN32)
list(APPEND _target_compile_flags -Wall -Wextra -Wpedantic)
set(_target_compile_flags -Wall -Wextra -Wpedantic)
else()
list(APPEND _target_compile_flags /W4)
set(_target_compile_flags /W4)
endif()
target_compile_options(${rosidl_generate_interfaces_TARGET}${_target_suffix} PRIVATE ${_target_compile_flags})

Expand Down

0 comments on commit 2fe9d3a

Please sign in to comment.