!34 修复由于多个target依赖了add_custom_command的输出引起的概率性的编译报错问题

From: @tangjie02 
Reviewed-by: @liubuguiii 
Signed-off-by: @liubuguiii
This commit is contained in:
openeuler-ci-bot 2022-09-23 09:35:47 +00:00 committed by Gitee
commit 9350113bdd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 58 additions and 2 deletions

View File

@ -0,0 +1,52 @@
From 2425d2e730d1decba801c381521178465da385ac Mon Sep 17 00:00:00 2001
From: tangjie02 <tangjie02@kylinsec.com.cn>
Date: Fri, 23 Sep 2022 17:05:12 +0800
Subject: [PATCH] fix(compile): Fix the probability compile error problem
caused by multiple targets depending on output files of add_custom_command.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复由于多个target依赖了add_custom_command的输出引起的概率性的编译报错问题
Closes #I5NP6A
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
---
src/CMakeLists.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f972713..335b677 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,6 +8,8 @@ file(GLOB_RECURSE CORE_CPP_FILES ./*.cpp)
gen_dbus_stub(CC_DAEMON cc_daemon com.kylinsec.
${CMAKE_SOURCE_DIR}/src/com.kylinsec.Kiran.CCDaemon.xml)
+add_custom_target(TARGET_CC_DAEMON DEPENDS ${CC_DAEMON_GENERATED_STUB})
+
configure_file(config.h.in ${PROJECT_BINARY_DIR}/config.h)
if(build-system-daemon)
@@ -28,6 +30,8 @@ if(build-system-daemon)
target_link_libraries(${TARGET_SYSTEM_DAEMON}
PRIVATE ${GMODULE_LIBRARIES} lib-base lib-dbus lib-iso)
+ add_dependencies(${TARGET_SYSTEM_DAEMON} TARGET_CC_DAEMON)
+
install(TARGETS ${TARGET_SYSTEM_DAEMON}
DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
@@ -60,6 +64,8 @@ if(build-session-daemon)
lib-iso
lib-display)
+ add_dependencies(${TARGET_SESSION_DAEMON} TARGET_CC_DAEMON)
+
install(TARGETS ${TARGET_SESSION_DAEMON}
DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
--
2.33.0

View File

@ -1,18 +1,19 @@
Name: kiran-cc-daemon
Version: 2.3.1
Release: 6
Release: 7
Summary: DBus daemon for Kiran Desktop
License: MulanPSL-2.0
Source0: %{name}-%{version}.tar.gz
Patch0001: 0001-fix-coredump-Fix-coredump-problem-caused-by-nullpoin.patch
Patch0002: 0001-fix-hidpi-Fixed-QT-font-DPI-to-avoid-double-scaling.patch
Patch0002: 0001-fix-hidpi-Fixed-QT-font-DPI-to-avoid-double-scaling.patch
Patch0003: 0001-feature-display-The-scaling-rate-can-only-take-effec.patch
Patch0004: 0001-fix-display-Fix-the-problem-that-all-monitors-doesn-.patch
Patch0005: 0001-feature-sonarqube-turn-off-sonarqube-check-to-get_er.patch
Patch0006: 0002-feature-error-Add-error-message-when-Failed-to-apply.patch
Patch0007: 0003-fix-display-Fixed-the-display-configuration-applicat.patch
Patch0008: 0001-fix-compile-Fix-the-probability-compile-error-proble.patch
BuildRequires: cmake >= 3.2
@ -152,6 +153,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || :
%{_libdir}/pkgconfig/kiran-cc-daemon.pc
%changelog
* Fri Sep 23 2022 tangjie02 <tangjie02@kylinsec.com.cn> - 2.3.1-7
- KYOS-B: Fix the probability compile error problem caused by multiple targets depending on output files of add_custom_command.(#I5NP6A)
* Tue Sep 06 2022 tangjie02 <tangjie02@kylinsec.com.cn> - 2.3.1-6
- KYOS-B: Fixed the display configuration application failure caused by output name matching failure
- KYOS-F: Add error message when Failed to apply display setting.