diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index 3851f6a6a245..efeda29500f6 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -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")