"...git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "c5c60c8f2ed88429b409ba612ee69e3b5fe4d86e"
Unverified Commit ec97d36c authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[cmake] [c++] require CMake 3.18+ (#6260)

parent 03ee9956
...@@ -27,17 +27,7 @@ if(APPLE) ...@@ -27,17 +27,7 @@ if(APPLE)
option(APPLE_OUTPUT_DYLIB "Output dylib shared library" OFF) option(APPLE_OUTPUT_DYLIB "Output dylib shared library" OFF)
endif() endif()
if(__INTEGRATE_OPENCL) cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.11)
elseif(USE_SWIG)
cmake_minimum_required(VERSION 3.8)
elseif(USE_GPU OR APPLE)
cmake_minimum_required(VERSION 3.2)
elseif(USE_CUDA)
cmake_minimum_required(VERSION 3.16)
else()
cmake_minimum_required(VERSION 3.0)
endif()
project(lightgbm LANGUAGES C CXX) project(lightgbm LANGUAGES C CXX)
...@@ -85,7 +75,6 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") ...@@ -85,7 +75,6 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.1.0") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.1.0")
message(FATAL_ERROR "Insufficient AppleClang version") message(FATAL_ERROR "Insufficient AppleClang version")
endif() endif()
cmake_minimum_required(VERSION 3.16)
elseif(MSVC) elseif(MSVC)
if(MSVC_VERSION LESS 1900) if(MSVC_VERSION LESS 1900)
message( message(
...@@ -93,7 +82,6 @@ elseif(MSVC) ...@@ -93,7 +82,6 @@ elseif(MSVC)
"The compiler ${CMAKE_CXX_COMPILER} doesn't support required C++11 features. Please use a newer MSVC." "The compiler ${CMAKE_CXX_COMPILER} doesn't support required C++11 features. Please use a newer MSVC."
) )
endif() endif()
cmake_minimum_required(VERSION 3.8)
endif() endif()
if(USE_SWIG) if(USE_SWIG)
......
...@@ -279,7 +279,7 @@ Installing CMake requires one download first and then a lot of configuration for ...@@ -279,7 +279,7 @@ Installing CMake requires one download first and then a lot of configuration for
:target: ./_static/images/screenshot-downloading-cmake.png :target: ./_static/images/screenshot-downloading-cmake.png
:alt: A screenshot of the binary distributions of C Make for downloading on 64 bit Windows. :alt: A screenshot of the binary distributions of C Make for downloading on 64 bit Windows.
- Download `CMake`_ (3.8 or higher) - Download `CMake`_
- Install CMake - Install CMake
......
...@@ -69,7 +69,7 @@ The ``.exe`` file will be in ``LightGBM-master/windows/x64/Release`` folder. ...@@ -69,7 +69,7 @@ The ``.exe`` file will be in ``LightGBM-master/windows/x64/Release`` folder.
From Command Line From Command Line
***************** *****************
1. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is already installed). 1. Install `Git for Windows`_, `CMake`_ and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is already installed).
2. Run the following commands: 2. Run the following commands:
...@@ -167,7 +167,7 @@ Install Using ``Homebrew`` ...@@ -167,7 +167,7 @@ Install Using ``Homebrew``
Build from GitHub Build from GitHub
***************** *****************
1. Install `CMake`_ (3.16 or higher): 1. Install `CMake`_ :
.. code:: sh .. code:: sh
...@@ -193,7 +193,7 @@ Build from GitHub ...@@ -193,7 +193,7 @@ Build from GitHub
gcc gcc
^^^ ^^^
1. Install `CMake`_ (3.2 or higher): 1. Install `CMake`_ :
.. code:: sh .. code:: sh
...@@ -266,7 +266,7 @@ The ``.exe`` file will be in ``LightGBM-master/windows/x64/Release`` folder. ...@@ -266,7 +266,7 @@ The ``.exe`` file will be in ``LightGBM-master/windows/x64/Release`` folder.
From Command Line From Command Line
----------------- -----------------
1. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is already installed). 1. Install `Git for Windows`_, `CMake`_ and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is already installed).
2. Run the following commands: 2. Run the following commands:
...@@ -331,7 +331,7 @@ Apple Clang ...@@ -331,7 +331,7 @@ Apple Clang
Only **Apple Clang** version 8.1 or higher is supported. Only **Apple Clang** version 8.1 or higher is supported.
1. Install `CMake`_ (3.16 or higher): 1. Install `CMake`_ :
.. code:: sh .. code:: sh
...@@ -351,7 +351,7 @@ Only **Apple Clang** version 8.1 or higher is supported. ...@@ -351,7 +351,7 @@ Only **Apple Clang** version 8.1 or higher is supported.
gcc gcc
*** ***
1. Install `CMake`_ (3.2 or higher): 1. Install `CMake`_ :
.. code:: sh .. code:: sh
...@@ -414,7 +414,7 @@ From Command Line ...@@ -414,7 +414,7 @@ From Command Line
1. You need to install `MS MPI`_ first. Both ``msmpisdk.msi`` and ``msmpisetup.exe`` are needed. 1. You need to install `MS MPI`_ first. Both ``msmpisdk.msi`` and ``msmpisetup.exe`` are needed.
2. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is already installed). 2. Install `Git for Windows`_, `CMake`_ and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is already installed).
3. Run the following commands: 3. Run the following commands:
...@@ -465,7 +465,7 @@ Apple Clang ...@@ -465,7 +465,7 @@ Apple Clang
Only **Apple Clang** version 8.1 or higher is supported. Only **Apple Clang** version 8.1 or higher is supported.
1. Install `CMake`_ (3.16 or higher): 1. Install `CMake`_ :
.. code:: sh .. code:: sh
...@@ -497,7 +497,7 @@ Only **Apple Clang** version 8.1 or higher is supported. ...@@ -497,7 +497,7 @@ Only **Apple Clang** version 8.1 or higher is supported.
gcc gcc
*** ***
1. Install `CMake`_ (3.2 or higher): 1. Install `CMake`_ :
.. code:: sh .. code:: sh
...@@ -547,7 +547,7 @@ The following dependencies should be installed before compilation: ...@@ -547,7 +547,7 @@ The following dependencies should be installed before compilation:
The following Debian packages should provide necessary Boost libraries: ``libboost-dev``, ``libboost-system-dev``, ``libboost-filesystem-dev``. The following Debian packages should provide necessary Boost libraries: ``libboost-dev``, ``libboost-system-dev``, ``libboost-filesystem-dev``.
- **CMake** 3.2 or later. - **CMake**
To build LightGBM GPU version, run the following commands: To build LightGBM GPU version, run the following commands:
...@@ -575,7 +575,7 @@ If you use **MinGW**, the build procedure is similar to the build on Linux. Refe ...@@ -575,7 +575,7 @@ If you use **MinGW**, the build procedure is similar to the build on Linux. Refe
Following procedure is for the **MSVC** (Microsoft Visual C++) build. Following procedure is for the **MSVC** (Microsoft Visual C++) build.
1. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is installed). 1. Install `Git for Windows`_, `CMake`_ and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is installed).
2. Install **OpenCL** for Windows. The installation depends on the brand (NVIDIA, AMD, Intel) of your GPU card. 2. Install **OpenCL** for Windows. The installation depends on the brand (NVIDIA, AMD, Intel) of your GPU card.
...@@ -637,7 +637,7 @@ The following dependencies should be installed before compilation: ...@@ -637,7 +637,7 @@ The following dependencies should be installed before compilation:
- **CUDA** 11.0 or later libraries. Please refer to `this detailed guide`_. Pay great attention to the minimum required versions of host compilers listed in the table from that guide and use only recommended versions of compilers. - **CUDA** 11.0 or later libraries. Please refer to `this detailed guide`_. Pay great attention to the minimum required versions of host compilers listed in the table from that guide and use only recommended versions of compilers.
- **CMake** 3.16 or later. - **CMake**
To build LightGBM CUDA version, run the following commands: To build LightGBM CUDA version, run the following commands:
...@@ -700,7 +700,7 @@ On Windows a Java wrapper of LightGBM can be built using **Java**, **SWIG**, **C ...@@ -700,7 +700,7 @@ On Windows a Java wrapper of LightGBM can be built using **Java**, **SWIG**, **C
VS Build Tools VS Build Tools
************** **************
1. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is already installed). 1. Install `Git for Windows`_, `CMake`_ and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is already installed).
2. Install `SWIG`_ and **Java** (also make sure that ``JAVA_HOME`` is set properly). 2. Install `SWIG`_ and **Java** (also make sure that ``JAVA_HOME`` is set properly).
...@@ -779,7 +779,7 @@ Apple Clang ...@@ -779,7 +779,7 @@ Apple Clang
Only **Apple Clang** version 8.1 or higher is supported. Only **Apple Clang** version 8.1 or higher is supported.
1. Install `CMake`_ (3.16 or higher): 1. Install `CMake`_ :
.. code:: sh .. code:: sh
...@@ -805,7 +805,7 @@ Only **Apple Clang** version 8.1 or higher is supported. ...@@ -805,7 +805,7 @@ Only **Apple Clang** version 8.1 or higher is supported.
gcc gcc
*** ***
1. Install `CMake`_ (3.2 or higher): 1. Install `CMake`_ :
.. code:: sh .. code:: sh
...@@ -839,7 +839,7 @@ Windows ...@@ -839,7 +839,7 @@ Windows
On Windows, C++ unit tests of LightGBM can be built using **CMake** and **VS Build Tools**. On Windows, C++ unit tests of LightGBM can be built using **CMake** and **VS Build Tools**.
1. Install `Git for Windows`_, `CMake`_ (3.8 or higher) and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is already installed). 1. Install `Git for Windows`_, `CMake`_ and `VS Build Tools`_ (**VS Build Tools** is not needed if **Visual Studio** (2015 or newer) is already installed).
2. Run the following commands: 2. Run the following commands:
...@@ -884,7 +884,7 @@ Apple Clang ...@@ -884,7 +884,7 @@ Apple Clang
Only **Apple Clang** version 8.1 or higher is supported. Only **Apple Clang** version 8.1 or higher is supported.
1. Install `CMake`_ (3.16 or higher): 1. Install `CMake`_ :
.. code:: sh .. code:: sh
...@@ -904,7 +904,7 @@ Only **Apple Clang** version 8.1 or higher is supported. ...@@ -904,7 +904,7 @@ Only **Apple Clang** version 8.1 or higher is supported.
gcc gcc
*** ***
1. Install `CMake`_ (3.2 or higher): 1. Install `CMake`_ :
.. code:: sh .. code:: sh
......
...@@ -63,7 +63,7 @@ build-backend = "scikit_build_core.build" ...@@ -63,7 +63,7 @@ build-backend = "scikit_build_core.build"
# based on https://github.com/scikit-build/scikit-build-core#configuration # based on https://github.com/scikit-build/scikit-build-core#configuration
[tool.scikit-build] [tool.scikit-build]
cmake.minimum-version = "3.15" cmake.minimum-version = "3.18"
ninja.minimum-version = "1.11" ninja.minimum-version = "1.11"
ninja.make-fallback = true ninja.make-fallback = true
cmake.args = [ cmake.args = [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment