Skip to content

Instantly share code, notes, and snippets.

@scotchi
Last active August 17, 2017 01:05
Show Gist options
  • Save scotchi/41e21e4597d22f5d84bc4881a9f9ca1d to your computer and use it in GitHub Desktop.
Save scotchi/41e21e4597d22f5d84bc4881a9f9ca1d to your computer and use it in GitHub Desktop.
Convert a list of paths based in the source root to absolute paths
function(convert_paths_to_absolute input output)
set(paths "")
foreach(source ${input})
get_filename_component(absolute ${source} ABSOLUTE ${CMAKE_SOURCE_DIR})
list(APPEND paths ${absolute})
endforeach()
set(${output} "${paths}" PARENT_SCOPE)
endfunction()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment