Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
5f5dcff6
Unverified
Commit
5f5dcff6
authored
Aug 28, 2019
by
Nikita Titov
Committed by
GitHub
Aug 28, 2019
Browse files
[python] correctly handle full path to compiler in CC and CXX env vars (#2345)
parent
4fc0416f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python-package/setup.py
python-package/setup.py
+2
-2
No files found.
python-package/setup.py
View file @
5f5dcff6
...
...
@@ -168,8 +168,8 @@ def compile_cpp(use_mingw=False, use_gpu=False, use_mpi=False,
else
:
# Linux, Darwin (macOS), etc.
logger
.
info
(
"Starting to compile with CMake."
)
# Apple Clang with OpenMP
if
system
()
==
'Darwin'
and
not
nomp
and
not
(
os
.
environ
.
get
(
'CC'
,
''
).
startswith
(
'gcc'
)
and
os
.
environ
.
get
(
'CXX'
,
''
).
startswith
(
'g++'
)):
if
system
()
==
'Darwin'
and
not
nomp
and
not
(
os
.
environ
.
get
(
'CC'
,
''
).
split
(
'/'
)[
-
1
].
split
(
'
\\
'
)[
-
1
].
startswith
(
'gcc'
)
and
os
.
environ
.
get
(
'CXX'
,
''
).
split
(
'/'
)[
-
1
].
split
(
'
\\
'
)[
-
1
].
startswith
(
'g++'
)):
def
get_cmake_opts
(
openmp_include_dir
,
openmp_library
):
if
openmp_include_dir
and
openmp_library
:
return
[
'-DOpenMP_C_FLAGS=-Xpreprocessor -fopenmp -I{0}'
.
format
(
openmp_include_dir
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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