Форматирование кода
This commit is contained in:
parent
8730aba9bf
commit
3c0fd214b9
@ -11,7 +11,7 @@ function(common_target_properties target)
|
|||||||
get_target_property(__sources ${target} SOURCES)
|
get_target_property(__sources ${target} SOURCES)
|
||||||
foreach(__src IN LISTS __sources)
|
foreach(__src IN LISTS __sources)
|
||||||
string(REGEX MATCH ".*/qrc_.*\\.cpp$" __qrc ${__src})
|
string(REGEX MATCH ".*/qrc_.*\\.cpp$" __qrc ${__src})
|
||||||
if (__qrc)
|
if(__qrc)
|
||||||
set_property(SOURCE ${__qrc} PROPERTY COTIRE_EXCLUDED ON)
|
set_property(SOURCE ${__qrc} PROPERTY COTIRE_EXCLUDED ON)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@ -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()
|
||||||
|
@ -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()
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
# Таким образом можно выполнять команду make, даже если правила
|
# Таким образом можно выполнять команду make, даже если правила
|
||||||
# сборки проекта сгенерированы для ninja.
|
# сборки проекта сгенерированы для ninja.
|
||||||
|
|
||||||
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()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user