mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-11 08:48:12 +00:00
[CMake] Migrate LLVMParseArguments to CMakeParseArguments.
llvm-svn: 199901
This commit is contained in:
parent
9b068a2c06
commit
5383113296
@ -243,7 +243,7 @@ configure_file(
|
||||
${CLANG_SOURCE_DIR}/include/clang/Config/config.h.cmake
|
||||
${CLANG_BINARY_DIR}/include/clang/Config/config.h)
|
||||
|
||||
include(LLVMParseArguments)
|
||||
include(CMakeParseArguments)
|
||||
|
||||
function(clang_tablegen)
|
||||
# Syntax:
|
||||
@ -258,16 +258,16 @@ function(clang_tablegen)
|
||||
# executing the custom command depending on output-file. It is
|
||||
# possible to list more files to depend after DEPENDS.
|
||||
|
||||
parse_arguments( CTG "SOURCE;TARGET;DEPENDS" "" ${ARGN} )
|
||||
cmake_parse_arguments(CTG "" "SOURCE;TARGET" "DEPENDS" ${ARGN})
|
||||
|
||||
if( NOT CTG_SOURCE )
|
||||
message(FATAL_ERROR "SOURCE source-file required by clang_tablegen")
|
||||
endif()
|
||||
|
||||
set( LLVM_TARGET_DEFINITIONS ${CTG_SOURCE} )
|
||||
tablegen( CLANG ${CTG_DEFAULT_ARGS} )
|
||||
tablegen(CLANG ${CTG_UNPARSED_ARGUMENTS})
|
||||
|
||||
list( GET CTG_DEFAULT_ARGS 0 output_file )
|
||||
list(GET CTG_UNPARSED_ARGUMENTS 0 output_file)
|
||||
if( CTG_TARGET )
|
||||
add_custom_target( ${CTG_TARGET} DEPENDS ${output_file} ${CTG_DEPENDS} )
|
||||
set_target_properties( ${CTG_TARGET} PROPERTIES FOLDER "Clang tablegenning")
|
||||
|
Loading…
Reference in New Issue
Block a user