Skip to content

Commit b474e31

Browse files
authored
Make ament_include_directories_order a function to allow paths with backslashes on windows. (#371)
* Repalce backslashes with forward slashes on Windows Signed-off-by: Shane Loretz <[email protected]> * Typo Signed-off-by: Shane Loretz <[email protected]> * Replace slashes in ARGN Signed-off-by: Shane Loretz <[email protected]> * Don't quote Signed-off-by: Shane Loretz <[email protected]> * Check ARGN has values before trying to string(REPLACE them Signed-off-by: Shane Loretz <[email protected]> * Make ament_include_directories_order a function Signed-off-by: Shane Loretz <[email protected]>
1 parent 4ac1ed1 commit b474e31

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

ament_cmake_include_directories/cmake/ament_include_directories_order.cmake

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@
2222
#
2323
# @public
2424
#
25-
macro(ament_include_directories_order var)
26-
set(_ament_prefix_path_list "$ENV{AMENT_PREFIX_PATH}")
25+
function(ament_include_directories_order var)
26+
set(prefixes "$ENV{AMENT_PREFIX_PATH}")
2727
if(NOT WIN32)
28-
string(REPLACE ":" ";" _ament_prefix_path_list "${_ament_prefix_path_list}")
28+
string(REPLACE ":" ";" prefixes "${prefixes}")
2929
endif()
30-
_ament_include_directories_order(${var} "${_ament_prefix_path_list}" ${ARGN})
31-
endmacro()
3230

33-
34-
function(_ament_include_directories_order var prefixes)
3531
# create list of empty slots, one per prefix and one for unknown prefixes
3632
list(LENGTH prefixes prefix_count)
3733
foreach(index RANGE ${prefix_count})

0 commit comments

Comments
 (0)