From 29985ad8948af74d8b6ad4e58428f65434e68f0c Mon Sep 17 00:00:00 2001 From: Eon Jeong Date: Mon, 8 Jun 2015 23:35:49 +0900 Subject: FindBISON: Use BISON_TARGET macro argument names internally The macro argument names are much clearer than ${ARGV#} references. --- Modules/FindBISON.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Modules/FindBISON.cmake') diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake index 4002cc6087..e1cad81e25 100644 --- a/Modules/FindBISON.cmake +++ b/Modules/FindBISON.cmake @@ -171,23 +171,23 @@ if(BISON_EXECUTABLE) # Header's name generated by bison (see option -d) list(APPEND BISON_TARGET_cmdopt "-d") - string(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${ARGV2}") + string(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${BisonOutput}") string(REPLACE "c" "h" _fileext ${_fileext}) string(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}" - BISON_${Name}_OUTPUT_HEADER "${ARGV2}") + BISON_${Name}_OUTPUT_HEADER "${BisonOutput}") list(APPEND BISON_TARGET_outputs "${BISON_${Name}_OUTPUT_HEADER}") add_custom_command(OUTPUT ${BISON_TARGET_outputs} ${BISON_TARGET_extraoutputs} COMMAND ${BISON_EXECUTABLE} - ARGS ${BISON_TARGET_cmdopt} -o ${ARGV2} ${ARGV1} - DEPENDS ${ARGV1} + ARGS ${BISON_TARGET_cmdopt} -o ${BisonOutput} ${BisonInput} + DEPENDS ${BisonInput} COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) # define target variables set(BISON_${Name}_DEFINED TRUE) - set(BISON_${Name}_INPUT ${ARGV1}) + set(BISON_${Name}_INPUT ${BisonInput}) set(BISON_${Name}_OUTPUTS ${BISON_TARGET_outputs}) set(BISON_${Name}_COMPILE_FLAGS ${BISON_TARGET_cmdopt}) set(BISON_${Name}_OUTPUT_SOURCE "${BisonOutput}") -- cgit v1.2.1