From dffdfe82c98e25cc8082b31c3eee86d22a2df6c7 Mon Sep 17 00:00:00 2001 From: zinface Date: Thu, 6 Apr 2023 16:13:22 +0800 Subject: [PATCH] =?UTF-8?q?cmake-debug:=20=E5=A2=9E=E5=8A=A0=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E9=A9=B1=E5=8A=A8=E5=86=85=E9=83=A8=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. QSci 基本属性与可传染性编译时宏定义 2. Notepad-- 基本属性 --- CMakeLists.txt | 5 +++++ cmake/modules/Notepad--.cmake | 19 ++++++++++--------- cmake/modules/QScint.cmake | 11 +++++++++++ 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 25ae737..ec4e4f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ else() include(cmake/SparkFindQt5Config.cmake) endif(USE_QT6) include(cmake/SparkMacrosExtendConfig.cmake) +include(cmake/SparkCMakeDebugConfig.cmake) # ----------------- 构建之前 全局定义 ----------------- # @@ -123,3 +124,7 @@ if(USE_QT6) message(NOTICE "[${QT56_PASS}] Qt5/Qt6 兼容性检查文件当前检查通过。") endif(NOT QT56_PASS) endif(USE_QT6) + + +# 在全局结束位置使用 cmake-debug 目标来驱动内部调试信息打印 +spark_generator_cmake_debug(cmake-debug) \ No newline at end of file diff --git a/cmake/modules/Notepad--.cmake b/cmake/modules/Notepad--.cmake index d7c2e10..45919e9 100644 --- a/cmake/modules/Notepad--.cmake +++ b/cmake/modules/Notepad--.cmake @@ -59,12 +59,13 @@ target_compile_definitions(${PROJECT_NAME} NO_PLUGIN # 开启插件支持 ) -# 用于打印目标属性生成器调试信息的自定义目标 -add_custom_target(targetdebug - COMMAND - ${CMAKE_COMMAND} -E echo - ">>>>> Notepad-- COMPILE_DEFINITIONS: $" - COMMAND - ${CMAKE_COMMAND} -E echo - ">>>>> Notepad-- LINK_LIBRARIES: $") - +# 添加 Notepad-- 目标属性与生成器调试信息 +spark_cmake_debug( + ">>>>>>>>>>>>>>>>>>>>>>>>>>> Notepad-- CMake Debug <<<<<<<<<<<<<<<<<<<<<<<<<<<" + "Notepad-- LINK_LIBRARIES: $" + "Notepad-- COMPILE_DEFINITIONS: $" + "Notepad-- INTERFACE: $" + "Notepad-- TARGET_FILE_BASE_NAME: $" + "Notepad-- TARGET_FILE_NAME: $" + ">>>>>>>>>>>>>>>>>>>>>>>>>>> Notepad-- CMake Debug <<<<<<<<<<<<<<<<<<<<<<<<<<<" +) \ No newline at end of file diff --git a/cmake/modules/QScint.cmake b/cmake/modules/QScint.cmake index 63eead3..0788c2c 100644 --- a/cmake/modules/QScint.cmake +++ b/cmake/modules/QScint.cmake @@ -77,3 +77,14 @@ if(UNIX) # 控制 QSCINTILLA_EXPORT 符号应为留空 ) endif(UNIX) + +# 添加 QSci 目标属性与生成器调试信息 +spark_cmake_debug( + ">>>>>>>>>>>>>>>>>>>>>>>>>>> QSci CMake Debug <<<<<<<<<<<<<<<<<<<<<<<<<<<" + "QSci LINK_LIBRARIES: $" + "QSci COMPILE_DEFINITIONS: $" + "QSci INTERFACE: $" + "QSci TARGET_FILE_BASE_NAME: $" + "QSci TARGET_FILE_NAME: $" + ">>>>>>>>>>>>>>>>>>>>>>>>>>> QSci CMake Debug <<<<<<<<<<<<<<<<<<<<<<<<<<<" +) \ No newline at end of file