File: 0003-modify-generator-buildsystem.patch

package info (click to toggle)
qevercloud 3.0.3+ds-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 916 kB
  • sloc: cpp: 4,690; yacc: 486; makefile: 38
file content (44 lines) | stat: -rw-r--r-- 2,178 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From: Boyuan Yang <073plan@gmail.com>
Date: Fri, 18 Aug 2017 09:56:11 +0800
Subject: generator: patch buildsystem to integrate with qevercloud.
Forwarded: not-needed

The buildsystem of QEverCloudGenerator is independent with the main
project QEverCloud and uses a bundled lemon source. After the removal
of lemon, the buildsystem needs patching to make everything works.
---
--- a/QEverCloudGenerator/CMakeLists.txt
+++ b/QEverCloudGenerator/CMakeLists.txt
@@ -7,10 +7,6 @@
 include(QEverCloudSetupQt)
 include(QEverCloudCompilerSettings)
 
-add_subdirectory(lemon)
-get_directory_property(lemon DIRECTORY lemon DEFINITION PROJECT_NAME)
-get_directory_property(lempar DIRECTORY lemon DEFINITION lempar)
-
 add_subdirectory(thrift_parser)
 get_directory_property(thrift_parser DIRECTORY thrift_parser DEFINITION PROJECT_NAME)
 
--- a/QEverCloudGenerator/thrift_parser/CMakeLists.txt
+++ b/QEverCloudGenerator/thrift_parser/CMakeLists.txt
@@ -13,12 +13,19 @@
     main.cpp
     Parser.cpp)
 
+set(lemon lemon)
+
 # Pre build step: copy thrift_lemon.y to build dir, execute lemon on it and remove the output file
 add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/thrift_lemon.out"
+                          "${CMAKE_CURRENT_BINARY_DIR}/thrift_lemon.cpp"
+                          "${CMAKE_CURRENT_BINARY_DIR}/thrift_lemon.h"
                    COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/thrift_lemon.y" "${CMAKE_CURRENT_BINARY_DIR}"
                    COMMAND ${CMAKE_COMMAND} -E echo "thrift_lemon.y was copied to build dir"
                    COMMAND ${lemon} "${CMAKE_CURRENT_BINARY_DIR}/thrift_lemon.y"
                    COMMAND ${CMAKE_COMMAND} -E echo "lemon was executed on thrift_lemon.y"
+                   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/thrift_lemon.c ${CMAKE_CURRENT_SOURCE_DIR}/thrift_lemon.cpp
+                   COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_SOURCE_DIR}/thrift_lemon.c
+                   COMMAND ${CMAKE_COMMAND} -E echo "workaround for thrift_lemon.c executed"
                    DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/thrift_lemon.y")
 
 add_custom_target(pre_build