From 5d2cc516a0b7b35c213a60c9babc69b656edb224 Mon Sep 17 00:00:00 2001 From: Nikita Titov Date: Sat, 27 Jun 2020 16:36:55 +0300 Subject: [PATCH] [docs] document option to build a static library (#3190) --- CMakeLists.txt | 2 +- docs/Installation-Guide.rst | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24ffbffda27f..7659017386a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ OPTION(USE_HDFS "Enable HDFS support (EXPERIMENTAL)" OFF) OPTION(USE_R35 "Set to ON if your R version is not earlier than 3.5" OFF) OPTION(USE_TIMETAG "Set to ON to output time costs" OFF) OPTION(USE_DEBUG "Set to ON for Debug mode" OFF) -option(BUILD_STATIC_LIB "Build static library" OFF) +OPTION(BUILD_STATIC_LIB "Build static library" OFF) OPTION(BUILD_FOR_R "Set to ON if building lib_lightgbm for use with the R package" OFF) if(APPLE) diff --git a/docs/Installation-Guide.rst b/docs/Installation-Guide.rst index 40ad419c7f36..6f25967e4e5f 100644 --- a/docs/Installation-Guide.rst +++ b/docs/Installation-Guide.rst @@ -7,6 +7,8 @@ All instructions below are aimed to compile 64-bit version of LightGBM. It is worth to compile 32-bit version only in very rare special cases of environmental limitations. 32-bit version is slow and untested, so use it on your own risk and don't forget to adjust some commands in this guide. +If you need to build a static library instead of a shared one, you can add ``-DBUILD_STATIC_LIB=ON`` to CMake flags. + Users who want to perform benchmarking can make LightGBM output time costs for different internal routines via adding ``-DUSE_TIMETAG=ON`` to CMake flags. It is possible to build LightGBM in a debug mode. In this mode all compiler optimizations are disabled and LightGBM performs more checks internally. To enable debug mode you can add ``-DUSE_DEBUG=ON`` to CMake flags or choose ``Debug_*`` configuration (e.g. ``Debug_DLL``, ``Debug_mpi``) in Visual Studio depending on how you are building LightGBM.