Skip to content

Commit 6c11156

Browse files
committed
static xgboost fix
1 parent e9b96cf commit 6c11156

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Internal/AlgoMarker/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ function(add_linking_flags TARGET_NAME)
9595
endfunction()
9696

9797
#Static linking
98+
set(BUILD_STATIC_LIB ON CACHE BOOL "Build XGBoost as a static library" FORCE)
99+
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build static libs" FORCE)
100+
98101
function(add_linking_flags_static TARGET_NAME)
99-
set(BUILD_STATIC_LIB ON CACHE BOOL "Build XGBoost as a static library" FORCE)
100102
target_link_libraries(${TARGET_NAME} ${ADDITIONAL_LINK_FLAGS} -Bstatic,--whole-archive -Wl,--start-group ${MEDIAL_INTERNAL_LIBS} -Wl,--end-group xgboost _lightgbm_static -Wl,-no-whole-archive -Wl,-Bdynamic)
101-
102103
endfunction()
103104

104105
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../)

0 commit comments

Comments
 (0)