forked from OSchip/llvm-project
[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_SOURCE_DIR}/include/clang/Config/config.h.cmake
|
||||||
${CLANG_BINARY_DIR}/include/clang/Config/config.h)
|
${CLANG_BINARY_DIR}/include/clang/Config/config.h)
|
||||||
|
|
||||||
include(LLVMParseArguments)
|
include(CMakeParseArguments)
|
||||||
|
|
||||||
function(clang_tablegen)
|
function(clang_tablegen)
|
||||||
# Syntax:
|
# Syntax:
|
||||||
|
@ -258,16 +258,16 @@ function(clang_tablegen)
|
||||||
# executing the custom command depending on output-file. It is
|
# executing the custom command depending on output-file. It is
|
||||||
# possible to list more files to depend after DEPENDS.
|
# 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 )
|
if( NOT CTG_SOURCE )
|
||||||
message(FATAL_ERROR "SOURCE source-file required by clang_tablegen")
|
message(FATAL_ERROR "SOURCE source-file required by clang_tablegen")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set( LLVM_TARGET_DEFINITIONS ${CTG_SOURCE} )
|
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 )
|
if( CTG_TARGET )
|
||||||
add_custom_target( ${CTG_TARGET} DEPENDS ${output_file} ${CTG_DEPENDS} )
|
add_custom_target( ${CTG_TARGET} DEPENDS ${output_file} ${CTG_DEPENDS} )
|
||||||
set_target_properties( ${CTG_TARGET} PROPERTIES FOLDER "Clang tablegenning")
|
set_target_properties( ${CTG_TARGET} PROPERTIES FOLDER "Clang tablegenning")
|
||||||
|
|
Loading…
Reference in New Issue