Форматирование кода

This commit is contained in:
Andrei Astafev 2020-04-14 12:20:01 +03:00
parent 8730aba9bf
commit 3c0fd214b9
7 changed files with 11 additions and 14 deletions

View File

@ -54,8 +54,8 @@ function(add_breathe target)
configure_file(${INDEX_MD_FILE} ${WORK_DIR}/index.md @ONLY) configure_file(${INDEX_MD_FILE} ${WORK_DIR}/index.md @ONLY)
file(GLOB MD_FILES ${CMAKE_SOURCE_DIR}/doc/breathe/*.md) file(GLOB MD_FILES ${CMAKE_SOURCE_DIR}/doc/breathe/*.md)
if(MD_FILES) if(MD_FILES)
add_custom_command(TARGET ${target} PRE_BUILD add_custom_command(TARGET ${target} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${MD_FILES} ${WORK_DIR}) ${MD_FILES} ${WORK_DIR})
endif() endif()
endif() endif()
@ -64,13 +64,12 @@ function(add_breathe target)
configure_file(${INDEX_RST_FILE} ${WORK_DIR}/index.rst @ONLY) configure_file(${INDEX_RST_FILE} ${WORK_DIR}/index.rst @ONLY)
file(GLOB RST_FILES ${CMAKE_SOURCE_DIR}/doc/breathe/*.rst) file(GLOB RST_FILES ${CMAKE_SOURCE_DIR}/doc/breathe/*.rst)
if(RST_FILES) if(RST_FILES)
add_custom_command(TARGET ${target} PRE_BUILD add_custom_command(TARGET ${target} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RST_FILES} ${WORK_DIR}) ${RST_FILES} ${WORK_DIR})
endif() endif()
endif() endif()
else() else()
message(STATUS "CMLIB warning:") message(STATUS "CMLIB warning:")
add_custom_target(${target} VERBATIM add_custom_target(${target} VERBATIM COMMENT " Breathe is not found. Skipping target ${target} build")
COMMENT " Breathe is not found. Skipping target ${target} build")
endif() endif()
endfunction() endfunction()

View File

@ -37,7 +37,6 @@ function(add_doxygen target)
COMMENT "Generating API documentation with Doxygen") COMMENT "Generating API documentation with Doxygen")
else() else()
message(STATUS "CMLIB warning:") message(STATUS "CMLIB warning:")
add_custom_target(${target} VERBATIM add_custom_target(${target} VERBATIM COMMENT " Doxygen is not found. Skipping target ${target} build")
COMMENT " Doxygen is not found. Skipping target ${target} build")
endif() endif()
endfunction() endfunction()

View File

@ -7,4 +7,3 @@
if("${CMAKE_GENERATOR}" MATCHES ".*Ninja$") if("${CMAKE_GENERATOR}" MATCHES ".*Ninja$")
file(WRITE ${CMAKE_BINARY_DIR}/Makefile ".PHONY: build\n%:\n\t@ninja \$@\nbuild:\n\t@ninja\n") file(WRITE ${CMAKE_BINARY_DIR}/Makefile ".PHONY: build\n%:\n\t@ninja \$@\nbuild:\n\t@ninja\n")
endif() endif()