diff --git a/CMakeLists.txt b/CMakeLists.txt index b39237da0..f70140549 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,12 +41,13 @@ if(USE_GPU) find_package(OpenCL REQUIRED) include_directories(${OpenCL_INCLUDE_DIRS}) MESSAGE(STATUS "OpenCL include directory:" ${OpenCL_INCLUDE_DIRS}) + set(Boost_USE_STATIC_LIBS ON) find_package(Boost 1.56.0 COMPONENTS filesystem system REQUIRED) - include_directories(${Boost_INCLUDE_DIRS}) if (WIN32) # disable autolinking in boost - ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB) + add_definitions( -DBOOST_ALL_NO_LIB ) endif() + include_directories(${Boost_INCLUDE_DIRS}) ADD_DEFINITIONS(-DUSE_GPU) endif(USE_GPU) @@ -69,11 +70,6 @@ if(MSVC) CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO ) - foreach(variable ${variables}) - if(${variable} MATCHES "/MD") - string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}") - endif() - endforeach() SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /O2 /Ob2 /Oi /Ot /Oy /GL") else() SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") diff --git a/windows/LightGBM.vcxproj b/windows/LightGBM.vcxproj index b78cffed9..12325d51f 100644 --- a/windows/LightGBM.vcxproj +++ b/windows/LightGBM.vcxproj @@ -94,7 +94,7 @@ false false Disabled - MultiThreadedDebug + MultiThreadedDebugDLL @@ -115,7 +115,7 @@ false false Disabled - MultiThreadedDebug + MultiThreadedDebugDLL @@ -136,7 +136,7 @@ false true true - MultiThreaded + MultiThreadedDLL @@ -159,7 +159,7 @@ true false true - MultiThreaded + MultiThreadedDLL true true @@ -178,7 +178,7 @@ true false true - MultiThreaded + MultiThreadedDLL true true