Skip to content

Commit

Permalink
Prefix macro variables with underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
dhood committed Apr 28, 2016
1 parent 92f8623 commit 2ae8819
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions rcl/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,13 @@ function(test_target_function)
endfunction()

macro(connext_workaround target)
if(NOT "${ARGN} " STREQUAL " ")
message(FATAL_ERROR "append_link_flags() called with "
"unused arguments: ${ARGN}")
endif()
if("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU ")
get_target_property(current_link_flags target LINK_FLAGS)
set(link_flags "-Wl,--no-as-needed")
if(current_link_flags)
set(link_flags ${current_link_flags} ${link_flags})
get_target_property(_current_link_flags ${target} LINK_FLAGS)
set(_link_flags "-Wl,--no-as-needed")
if(_current_link_flags)
set(_link_flags ${_current_link_flags} ${_link_flags})
endif()
set_target_properties(${target} PROPERTIES LINK_FLAGS "${link_flags}")
set_target_properties(${target} PROPERTIES LINK_FLAGS "${_link_flags}")
endif()
endmacro()

Expand Down

0 comments on commit 2ae8819

Please sign in to comment.