Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
a6b60841
Commit
a6b60841
authored
Apr 28, 2004
by
Bill Hoffman
Browse files
BUG: fix for bug 116 platform files can now specify directories that should not be added by CMAKE
parent
e539cf9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Modules/Platform/Darwin.cmake
View file @
a6b60841
...
...
@@ -25,3 +25,5 @@ SET(CMAKE_C_CREATE_SHARED_MODULE
"<CMAKE_C_COMPILER> <CMAKE_SHARED_MODULE_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>"
)
INCLUDE
(
${
CMAKE_ROOT
}
/Modules/Platform/gcc.cmake
)
SET
(
CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES /usr/local/include
)
Source/cmLocalUnixMakefileGenerator.cxx
View file @
a6b60841
...
...
@@ -2487,13 +2487,26 @@ void cmLocalUnixMakefileGenerator::OutputMakeVariables(std::ostream& fout)
std
::
vector
<
std
::
string
>::
iterator
i
;
fout
<<
"-I"
<<
this
->
ConvertToOutputForExisting
(
m_Makefile
->
GetStartDirectory
())
<<
" "
;
std
::
map
<
cmStdString
,
cmStdString
>
implicitIncludes
;
implicitIncludes
[
"/usr/include"
]
=
"/usr/include"
;
if
(
m_Makefile
->
GetDefinition
(
"CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES"
))
{
std
::
string
arg
=
m_Makefile
->
GetDefinition
(
"CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES"
);
std
::
vector
<
std
::
string
>
implicitIncludeVec
;
cmSystemTools
::
ExpandListArgument
(
arg
,
implicitIncludeVec
);
for
(
int
k
=
0
;
k
<
implicitIncludeVec
.
size
();
k
++
)
{
implicitIncludes
[
implicitIncludeVec
[
k
]]
=
implicitIncludeVec
[
k
];
}
}
for
(
i
=
includes
.
begin
();
i
!=
includes
.
end
();
++
i
)
{
std
::
string
include
=
*
i
;
// Don't output a -I for the standard include path "/usr/include".
// This can cause problems with certain standard library
// implementations because the wrong headers may be found first.
if
(
i
nclude
!=
"/usr/include"
)
if
(
i
mplicitIncludes
.
find
(
include
)
==
implicitIncludes
.
end
()
)
{
fout
<<
"-I"
<<
this
->
ConvertToOutputForExisting
(
i
->
c_str
())
<<
" "
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment