1 |
creffett 13/01/01 19:25:58 |
2 |
|
3 |
Added: cmake-2.8.10.2-implicit-include.patch |
4 |
Log: |
5 |
Revision bump. Add patch to fix stripping implicit include dirs, bug 444340. Add shell-script magic in ebuild to strip extra jobs values in MAKEOPTS (which causes build failures), bug 447040. |
6 |
|
7 |
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key 42618354) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-util/cmake/files/cmake-2.8.10.2-implicit-include.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-2.8.10.2-implicit-include.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-2.8.10.2-implicit-include.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: cmake-2.8.10.2-implicit-include.patch |
16 |
=================================================================== |
17 |
--- a/Source/cmLocalGenerator.cxx |
18 |
+++ b/Source/cmLocalGenerator.cxx |
19 |
@@ -1329,7 +1329,9 @@ std::string cmLocalGenerator::GetIncludeFlags( |
20 |
void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs, |
21 |
cmGeneratorTarget* target, |
22 |
const char* lang, |
23 |
- const char *config) |
24 |
+ const char *config, |
25 |
+ bool stripImplicitInclDirs |
26 |
+ ) |
27 |
{ |
28 |
// Need to decide whether to automatically include the source and |
29 |
// binary directories at the beginning of the include path. |
30 |
@@ -1404,18 +1406,21 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs, |
31 |
return; |
32 |
} |
33 |
|
34 |
- // Load implicit include directories for this language. |
35 |
- std::string impDirVar = "CMAKE_"; |
36 |
- impDirVar += lang; |
37 |
- impDirVar += "_IMPLICIT_INCLUDE_DIRECTORIES"; |
38 |
- if(const char* value = this->Makefile->GetDefinition(impDirVar.c_str())) |
39 |
+ if (stripImplicitInclDirs) |
40 |
{ |
41 |
- std::vector<std::string> impDirVec; |
42 |
- cmSystemTools::ExpandListArgument(value, impDirVec); |
43 |
- for(std::vector<std::string>::const_iterator i = impDirVec.begin(); |
44 |
- i != impDirVec.end(); ++i) |
45 |
+ // Load implicit include directories for this language. |
46 |
+ std::string impDirVar = "CMAKE_"; |
47 |
+ impDirVar += lang; |
48 |
+ impDirVar += "_IMPLICIT_INCLUDE_DIRECTORIES"; |
49 |
+ if(const char* value = this->Makefile->GetDefinition(impDirVar.c_str())) |
50 |
{ |
51 |
- emitted.insert(*i); |
52 |
+ std::vector<std::string> impDirVec; |
53 |
+ cmSystemTools::ExpandListArgument(value, impDirVec); |
54 |
+ for(std::vector<std::string>::const_iterator i = impDirVec.begin(); |
55 |
+ i != impDirVec.end(); ++i) |
56 |
+ { |
57 |
+ emitted.insert(*i); |
58 |
+ } |
59 |
} |
60 |
} |
61 |
|
62 |
--- a/Source/cmLocalGenerator.h |
63 |
+++ b/Source/cmLocalGenerator.h |
64 |
@@ -212,7 +212,8 @@ public: |
65 |
/** Get the include flags for the current makefile and language. */ |
66 |
void GetIncludeDirectories(std::vector<std::string>& dirs, |
67 |
cmGeneratorTarget* target, |
68 |
- const char* lang = "C", const char *config = 0); |
69 |
+ const char* lang = "C", const char *config = 0, |
70 |
+ bool stripImplicitInclDirs = true); |
71 |
|
72 |
/** Compute the language used to compile the given source file. */ |
73 |
const char* GetSourceFileLanguage(const cmSourceFile& source); |
74 |
--- a/Source/cmQtAutomoc.cxx |
75 |
+++ b/Source/cmQtAutomoc.cxx |
76 |
@@ -212,36 +212,11 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) |
77 |
} |
78 |
|
79 |
|
80 |
- const char* qtIncDir = 0; |
81 |
- const char* qtCoreIncDir = 0; |
82 |
- |
83 |
- // check whether ${QT_INCLUDE_DIR} is part of the implicit include dirs, |
84 |
- // see http://public.kitware.com/Bug/view.php?id=13667 |
85 |
- bool qtIncludeDirMayHaveBeenRemoved = false; |
86 |
- if (makefile->IsSet("QT_INCLUDE_DIR")) |
87 |
- { |
88 |
- qtIncDir = makefile->GetDefinition("QT_INCLUDE_DIR"); |
89 |
- std::string s = |
90 |
- makefile->GetSafeDefinition("CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES"); |
91 |
- std::vector<std::string> implIncDirs; |
92 |
- cmSystemTools::ExpandListArgument(s, implIncDirs); |
93 |
- if (std::find(implIncDirs.begin(), implIncDirs.end(),std::string(qtIncDir)) |
94 |
- != implIncDirs.end()) |
95 |
- { |
96 |
- qtIncludeDirMayHaveBeenRemoved = true; |
97 |
- if (makefile->IsSet("QT_QTCORE_INCLUDE_DIR")) |
98 |
- { |
99 |
- qtCoreIncDir = makefile->GetDefinition("QT_QTCORE_INCLUDE_DIR"); |
100 |
- } |
101 |
- } |
102 |
- } |
103 |
- |
104 |
- bool haveQtCoreIncDir = false; |
105 |
- bool haveQtIncDir = false; |
106 |
- |
107 |
std::vector<std::string> includeDirs; |
108 |
cmGeneratorTarget gtgt(target); |
109 |
- localGen->GetIncludeDirectories(includeDirs, >gt, "CXX"); |
110 |
+ // Get the include dirs for this target, without stripping the implicit |
111 |
+ // include dirs off, see http://public.kitware.com/Bug/view.php?id=13667 |
112 |
+ localGen->GetIncludeDirectories(includeDirs, >gt, "CXX", 0, false); |
113 |
std::string _moc_incs = ""; |
114 |
const char* sep = ""; |
115 |
for(std::vector<std::string>::const_iterator incDirIt = includeDirs.begin(); |
116 |
@@ -251,37 +226,6 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) |
117 |
_moc_incs += sep; |
118 |
sep = ";"; |
119 |
_moc_incs += *incDirIt; |
120 |
- |
121 |
- if (qtIncludeDirMayHaveBeenRemoved && qtCoreIncDir && qtIncDir) // #13667 |
122 |
- { |
123 |
- if (*incDirIt == qtIncDir) |
124 |
- { |
125 |
- haveQtIncDir = true; |
126 |
- qtIncludeDirMayHaveBeenRemoved = false; // it's here, i.e. not removed |
127 |
- } |
128 |
- if (*incDirIt == qtCoreIncDir) |
129 |
- { |
130 |
- haveQtCoreIncDir = true; |
131 |
- } |
132 |
- } |
133 |
- } |
134 |
- |
135 |
- // Some projects (kdelibs, phonon) query the compiler for its default |
136 |
- // include search dirs, and add those to |
137 |
- // CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES. |
138 |
- // These may include e.g./usr/lib/qt/include . This is typically also part |
139 |
- // of ${QT_INCLUDES}. If this directory is then contained in the implicit |
140 |
- // include dirs, it is removed from the include dirs returned from the |
141 |
- // target above. So we add ${QT_INCLUDE_DIR} manually for moc if we detected |
142 |
- // that ${QT_QTCORE_INCLUDE_DIR} is among the include dirs (there shouldn't |
143 |
- // be a way to use Qt4 without using ${QT_QTCORE_INCLUDE_DIR} I think. |
144 |
- // See #13646 and #13667. |
145 |
- if (qtIncludeDirMayHaveBeenRemoved && qtCoreIncDir && qtIncDir |
146 |
- && (haveQtCoreIncDir == true) && (haveQtIncDir == false)) |
147 |
- { |
148 |
- _moc_incs += sep; |
149 |
- sep = ";"; |
150 |
- _moc_incs += qtIncDir; |
151 |
} |
152 |
|
153 |
const char* tmp = target->GetProperty("COMPILE_DEFINITIONS"); |
154 |
-- |
155 |
1.7.0 |