File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ dmlccore_option(USE_PARQUET "Build with Arrow Parquet" OFF)
2626dmlccore_option (USE_OPENMP "Build with OpenMP" ON )
2727dmlccore_option (GOOGLE_TEST "Build google tests" OFF )
2828dmlccore_option (INSTALL_DOCUMENTATION "Install documentation" OFF )
29+ dmlccore_option (DMLC_SHARED_LIBRARY "Build a shared library" OFF )
2930dmlccore_option (DMLC_FORCE_SHARED_CRT "Build with dynamic CRT on Windows (/MD)" OFF )
3031dmlccore_option (DMLC_USE_SANITIZER "Use santizer flags; to specify a custom path for sanitizers, set this variable a value that's not ON or OFF" OFF )
3132set (DMLC_ENABLED_SANITIZERS "address" "leak" CACHE STRING
@@ -53,10 +54,14 @@ if(USE_AZURE)
5354 list (APPEND SOURCE "src/io/azure_filesys.cc" )
5455endif ()
5556
56- add_library (dmlc ${SOURCE} )
57- set_target_properties (dmlc PROPERTIES
58- VERSION ${PROJECT_VERSION }
59- SOVERSION ${PROJECT_VERSION_MAJOR } )
57+ if (DMLC_SHARED_LIBRARY)
58+ add_library (dmlc SHARED ${SOURCE} )
59+ set_target_properties (dmlc PROPERTIES
60+ VERSION ${PROJECT_VERSION }
61+ SOVERSION ${PROJECT_VERSION_MAJOR } )
62+ else ()
63+ add_library (dmlc STATIC ${SOURCE} )
64+ endif ()
6065target_compile_features (dmlc PUBLIC cxx_std_14 )
6166
6267# Sanitizer
You can’t perform that action at this time.
0 commit comments