Порядок инициализации аргументов

This commit is contained in:
Andrei Astafev 2019-10-07 11:43:32 +03:00
parent f630318d67
commit fc5bbbd4c1
2 changed files with 11 additions and 12 deletions

View File

@ -21,12 +21,12 @@ endif()
function(add_breathe_target) function(add_breathe_target)
if(BREATHE_FOUND) set(options)
set(options) set(oneValueArgs SOURCE_DIR BUILD_DIR CACHE_DIR HTML_DIR DOXY_FILE CONF_FILE TARGET_NAME COMMENT)
set(oneValueArgs SOURCE_DIR BUILD_DIR CACHE_DIR HTML_DIR DOXY_FILE CONF_FILE TARGET_NAME COMMENT) set(multiValueArgs)
set(multiValueArgs)
cmake_parse_arguments(_BREATHE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) cmake_parse_arguments(_BREATHE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(BREATHE_FOUND)
set(BREATHE_DOCS_BUILD_DIR ${_BREATHE_BUILD_DIR}) set(BREATHE_DOCS_BUILD_DIR ${_BREATHE_BUILD_DIR})
set(GENERATE_XML YES) set(GENERATE_XML YES)
set(GENERATE_HTML NO) set(GENERATE_HTML NO)

View File

@ -10,12 +10,12 @@ endif()
function(add_doxygen_target) function(add_doxygen_target)
if (DOXYGEN_FOUND) set(options)
set(options) set(oneValueArgs TARGET_NAME DOXY_FILE OUTPUT_DIRECTORY LATEX HTML)
set(oneValueArgs TARGET_NAME DOXY_FILE OUTPUT_DIRECTORY LATEX HTML) set(multiValueArgs)
set(multiValueArgs)
cmake_parse_arguments(_DOXYGEN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) cmake_parse_arguments(_DOXYGEN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (DOXYGEN_FOUND)
set(GENERATE_XML NO) set(GENERATE_XML NO)
set(GENERATE_HTML NO) set(GENERATE_HTML NO)
set(GENERATE_LATEX NO) set(GENERATE_LATEX NO)
@ -32,8 +32,7 @@ function(add_doxygen_target)
add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM
COMMAND ${DOXYGEN_EXECUTABLE} ${_DOXYGEN_OUTPUT_DIRECTORY}/Doxyfile COMMAND ${DOXYGEN_EXECUTABLE} ${_DOXYGEN_OUTPUT_DIRECTORY}/Doxyfile
WORKING_DIRECTORY ${_DOXYGEN_OUTPUT_DIRECTORY} WORKING_DIRECTORY ${_DOXYGEN_OUTPUT_DIRECTORY}
COMMENT "Generating API documentation with Doxygen" COMMENT "Generating API documentation with Doxygen")
VERBATIM)
else() else()
add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM add_custom_target(${_DOXYGEN_TARGET_NAME} VERBATIM
COMMENT "Doxygen is not found. Skipping target ${_DOXYGEN_TARGET_NAME} build") COMMENT "Doxygen is not found. Skipping target ${_DOXYGEN_TARGET_NAME} build")