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
ce766adc
Commit
ce766adc
authored
Jul 13, 2018
by
Qiwei Ye
Browse files
Merge commit 'refs/pull/1501/head' of
https://github.com/Microsoft/LightGBM
parents
ca30afe1
40b60eb4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
5 deletions
+48
-5
CMakeLists.txt
CMakeLists.txt
+10
-3
docs/Installation-Guide.rst
docs/Installation-Guide.rst
+38
-2
No files found.
CMakeLists.txt
View file @
ce766adc
if
(
MSVC
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
cmake_minimum_required
(
VERSION 3.12
)
elseif
(
MSVC
)
cmake_minimum_required
(
VERSION 3.8
)
cmake_minimum_required
(
VERSION 3.8
)
elseif
(
USE_GPU OR APPLE
)
elseif
(
USE_GPU OR APPLE
)
cmake_minimum_required
(
VERSION 3.2
)
cmake_minimum_required
(
VERSION 3.2
)
...
@@ -23,8 +25,6 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
...
@@ -23,8 +25,6 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS
"3.8"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS
"3.8"
)
message
(
FATAL_ERROR
"Insufficient Clang version"
)
message
(
FATAL_ERROR
"Insufficient Clang version"
)
endif
()
endif
()
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
message
(
FATAL_ERROR
"AppleClang isn't supported. Please see https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#macos"
)
endif
()
endif
()
if
(
APPLE
)
if
(
APPLE
)
...
@@ -183,6 +183,13 @@ if(USE_MPI)
...
@@ -183,6 +183,13 @@ if(USE_MPI)
TARGET_LINK_LIBRARIES
(
_lightgbm
${
MPI_CXX_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
_lightgbm
${
MPI_CXX_LIBRARIES
}
)
endif
(
USE_MPI
)
endif
(
USE_MPI
)
if
(
USE_OPENMP
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
TARGET_LINK_LIBRARIES
(
lightgbm
${
OpenMP_libomp_LIBRARY
}
)
TARGET_LINK_LIBRARIES
(
_lightgbm
${
OpenMP_libomp_LIBRARY
}
)
endif
()
endif
(
USE_OPENMP
)
if
(
USE_GPU
)
if
(
USE_GPU
)
TARGET_LINK_LIBRARIES
(
lightgbm
${
OpenCL_LIBRARY
}
${
Boost_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
lightgbm
${
OpenCL_LIBRARY
}
${
Boost_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
_lightgbm
${
OpenCL_LIBRARY
}
${
Boost_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
_lightgbm
${
OpenCL_LIBRARY
}
${
Boost_LIBRARIES
}
)
...
...
docs/Installation-Guide.rst
View file @
ce766adc
...
@@ -87,7 +87,25 @@ Also you may want to read `gcc Tips <./gcc-Tips.rst>`__.
...
@@ -87,7 +87,25 @@ Also you may want to read `gcc Tips <./gcc-Tips.rst>`__.
macOS
macOS
~~~~~
~~~~~
LightGBM depends on **OpenMP** for compiling, which isn't supported by Apple Clang.
LightGBM can use Apple Clang (9.0 or higher), or GCC/G++ to build in macOS.
Apple Clang (9.0 or higher)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
1. Install `CMake`_ (3.12 or higher).
2. Run the following commands:
.. code::
brew install libomp
git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
cmake ..
make -j4
GCC/G++
^^^^^^^
Please install **gcc/g++** by using the following commands:
Please install **gcc/g++** by using the following commands:
...
@@ -330,7 +348,25 @@ LightGBM uses **CMake** to build. Run the following commands:
...
@@ -330,7 +348,25 @@ LightGBM uses **CMake** to build. Run the following commands:
macOS
macOS
^^^^^
^^^^^
LightGBM depends on **OpenMP** for compiling, which isn't supported by Apple Clang.
LightGBM can use Apple Clang (9.0 or higher), or GCC/G++ to build in macOS.
Apple Clang (9.0 or higher)
***************************
1. Install `CMake`_ (3.12 or higher).
2. Run the following commands:
.. code::
brew install libomp
git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
cmake -DUSE_HDFS=ON ..
make -j4
GCC/G++
*******
Please install **gcc/g++** by using the following commands:
Please install **gcc/g++** by using the following commands:
...
...
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