Matthias Maennich e8b148318f CMakeParseArguments: replace by native cmake_parse_arguments command
Implement a native `cmake_parse_arguments` command that is fully
compatible with the documented behaviour of the previous implementation.
Leave the CMakeParseArguments module empty but existing for
compatibility.
2015-12-17 10:44:28 -05:00

16 lines
565 B
CMake

include(${CMAKE_CURRENT_LIST_DIR}/test_utils.cmake)
# example from the documentation
# OPTIONAL is a keyword and therefore terminates the definition of
# the multi-value DEFINITION before even a single value has been added
set(options OPTIONAL FAST)
set(oneValueArgs DESTINATION RENAME)
set(multiValueArgs TARGETS CONFIGURATIONS)
cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}"
"${multiValueArgs}"
TARGETS foo DESTINATION OPTIONAL)
TEST(MY_INSTALL_DESTINATION UNDEFINED)
TEST(MY_INSTALL_OPTIONAL TRUE)