Skip to content

Commit

Permalink
move APPLE_OUTPUT_DYLIB option closer to the rest options (#3547)
Browse files Browse the repository at this point in the history
* move APPLE_OUTPUT_DYLIB option closer to the rest options

* Update CMakeLists.txt
  • Loading branch information
StrikerRUS authored Nov 9, 2020
1 parent 6e210c9 commit 6c10c4c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ 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)
OPTION(__INTEGRATE_OPENCL "Set to ON if building LightGBM with the OpenCL ICD Loader and its dependencies included" OFF)

if(APPLE)
OPTION(APPLE_OUTPUT_DYLIB "Output dylib shared library" OFF)
endif(APPLE)

if(__INTEGRATE_OPENCL)
cmake_minimum_required(VERSION 3.11)
elseif(USE_GPU OR APPLE)
Expand All @@ -23,6 +27,7 @@ else()
endif()

if(__BUILD_FOR_R)
# Should be always before PROJECT command
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
endif(__BUILD_FOR_R)

Expand All @@ -32,10 +37,6 @@ else()
PROJECT(lightgbm LANGUAGES C CXX)
endif()

if(APPLE)
OPTION(APPLE_OUTPUT_DYLIB "Output dylib shared library" OFF)
endif(APPLE)

if(__INTEGRATE_OPENCL)
set(__INTEGRATE_OPENCL ON CACHE BOOL "" FORCE)
set(USE_GPU OFF CACHE BOOL "" FORCE)
Expand Down

0 comments on commit 6c10c4c

Please sign in to comment.