/usr/share/camitk-3.2/cmake/macros/ParseArguments.cmake is in libcamitk3-dev 3.2.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #!
#! \addtogroup CamiTKMacros
#!
#! macro parse_arguments is a fork from CMakeMacroParseArguments
#! see http://www.cmake.org/Wiki/CMakeMacroParseArguments
#! for more information
#!
#! Usage:
#! \code
#! parse_arguments(PREFIX POSSIBLE_ARGUMENTS POSSIBLE_OPTIONS)
#! \endcode
#!
macro(parse_arguments prefix arg_names option_names)
set(DEFAULT_ARGS)
foreach(arg_name ${arg_names})
set(${prefix}_${arg_name})
endforeach()
foreach(option ${option_names})
set(${prefix}_${option} FALSE)
endforeach()
set(current_arg_name DEFAULT_ARGS)
set(current_arg_list)
foreach(arg ${ARGN})
set(larg_names ${arg_names})
list(FIND larg_names "${arg}" is_arg_name)
if (is_arg_name GREATER -1)
set(${prefix}_${current_arg_name} ${current_arg_list})
set(current_arg_name ${arg})
set(current_arg_list)
else()
set(loption_names ${option_names})
list(FIND loption_names "${arg}" is_option)
if (is_option GREATER -1)
set(${prefix}_${arg} TRUE)
else()
set(current_arg_list ${current_arg_list} ${arg})
endif()
endif()
endforeach()
set(${prefix}_${current_arg_name} ${current_arg_list})
endmacro()
|