diff options
author | Filipe Cabecinhas <me@filcab.net> | 2015-06-19 03:39:24 +0000 |
---|---|---|
committer | Filipe Cabecinhas <me@filcab.net> | 2015-06-19 03:39:24 +0000 |
commit | c309de7c43088f55035694a13d4fa65e437a932a (patch) | |
tree | 1bd95f00cd87550a52dec2ee0a2158626430deec /cmake/Modules/SanitizerUtils.cmake | |
parent | 271d42ab6a140f9bb897a49a6aa8627356890aa0 (diff) |
CMake: Stop using LLVM's custom parse_arguments. NFC
Summary:
Use CMake's cmake_parse_arguments() instead.
It's called in a slightly different way, but supports all our use cases.
It's in CMake 2.8.8, which is our minimum supported version.
CMake 3.0 doc (roughly the same. No direct link to 2.8.8 doc):
http://www.cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html?highlight=cmake_parse_arguments
Since I was already changing these calls, I changed ARCH and LIB into
ARCHS and LIBS to make it more clear that they're lists of arguments.
Reviewers: eugenis, samsonov, beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10529
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules/SanitizerUtils.cmake')
-rw-r--r-- | cmake/Modules/SanitizerUtils.cmake | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cmake/Modules/SanitizerUtils.cmake b/cmake/Modules/SanitizerUtils.cmake index 1e8e89daa..c040b4212 100644 --- a/cmake/Modules/SanitizerUtils.cmake +++ b/cmake/Modules/SanitizerUtils.cmake @@ -1,5 +1,3 @@ -include(LLVMParseArguments) - set(SANITIZER_GEN_DYNAMIC_LIST ${COMPILER_RT_SOURCE_DIR}/lib/sanitizer_common/scripts/gen_dynamic_list.py) @@ -50,19 +48,19 @@ endmacro() macro(add_sanitizer_rt_version_list name) set(vers ${CMAKE_CURRENT_BINARY_DIR}/${name}.vers) - parse_arguments(ARG "LIB;EXTRA" "" ${ARGN}) + cmake_parse_arguments(ARG "" "" "LIBS;EXTRA" ${ARGN}) set(args) foreach(arg ${ARG_EXTRA}) list(APPEND args "--extra" ${arg}) endforeach() - foreach(arg ${ARG_LIB}) + foreach(arg ${ARG_LIBS}) list(APPEND args "$<TARGET_FILE:${arg}>") endforeach() add_custom_command(OUTPUT ${vers} COMMAND ${PYTHON_EXECUTABLE} ${SANITIZER_GEN_DYNAMIC_LIST} --version-list ${args} > ${vers} - DEPENDS ${SANITIZER_GEN_DYNAMIC_LIST} ${ARG_EXTRA} ${ARG_LIB} + DEPENDS ${SANITIZER_GEN_DYNAMIC_LIST} ${ARG_EXTRA} ${ARG_LIBS} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating version list for ${name}" VERBATIM) |