diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-11-20 13:41:22 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-11-23 16:02:56 +0100 |
commit | 4f84d9ce888864bd4fd3863ace3df33a64236d6b (patch) | |
tree | 56056d51ecc41ff13b888c505ee469ab7235e84a /cmake/mysql_add_executable.cmake | |
parent | 061f84ab86ce8a9df6c7bb364a706c19e8a4e139 (diff) | |
download | mariadb-git-4f84d9ce888864bd4fd3863ace3df33a64236d6b.tar.gz |
cmake: MYSQL_PARSE_ARGUMENTS -> CMAKE_PARSE_ARGUMENTS
Diffstat (limited to 'cmake/mysql_add_executable.cmake')
-rw-r--r-- | cmake/mysql_add_executable.cmake | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/cmake/mysql_add_executable.cmake b/cmake/mysql_add_executable.cmake index 0c93fb179f5..c8027eeea51 100644 --- a/cmake/mysql_add_executable.cmake +++ b/cmake/mysql_add_executable.cmake @@ -24,21 +24,37 @@ # - add version resource # - instruct CPack to do autenticode signing if SIGNCODE is set -INCLUDE(cmake_parse_arguments) +INCLUDE(CMakeParseArguments) FUNCTION (MYSQL_ADD_EXECUTABLE) # Pass-through arguments for ADD_EXECUTABLE - MYSQL_PARSE_ARGUMENTS(ARG - "WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT" + CMAKE_PARSE_ARGUMENTS(ARG + "WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL" + "DESTINATION;COMPONENT" "" ${ARGN} ) - LIST(GET ARG_DEFAULT_ARGS 0 target) - LIST(REMOVE_AT ARG_DEFAULT_ARGS 0) + LIST(GET ARG_UNPARSED_ARGUMENTS 0 target) + LIST(REMOVE_AT ARG_UNPARSED_ARGUMENTS 0) - SET(sources ${ARG_DEFAULT_ARGS}) + SET(sources ${ARG_UNPARSED_ARGUMENTS}) ADD_VERSION_INFO(${target} EXECUTABLE sources) - ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources}) + IF (ARG_WIN32) + SET(WIN32 WIN32) + ELSE() + UNSET(WIN32) + ENDIF() + IF (ARG_MACOSX_BUNDLE) + SET(MACOSX_BUNDLE MACOSX_BUNDLE) + ELSE() + UNSET(MACOSX_BUNDLE) + ENDIF() + IF (ARG_EXCLUDE_FROM_ALL) + SET(EXCLUDE_FROM_ALL EXCLUDE_FROM_ALL) + ELSE() + UNSET(EXCLUDE_FROM_ALL) + ENDIF() + ADD_EXECUTABLE(${target} ${WIN32} ${MACOSX_BUNDLE} ${EXCLUDE_FROM_ALL} ${sources}) # tell CPack where to install IF(NOT ARG_EXCLUDE_FROM_ALL) IF(NOT ARG_DESTINATION) |