Skip to content

Commit

Permalink
Thread group and lifeccycle management (#344)
Browse files Browse the repository at this point in the history
* Refreshed branch sync

* relax test

* Relax text for slow machine
  • Loading branch information
cjolivier01 authored and piiswrong committed Jan 16, 2018
1 parent 6389c10 commit 2777ad9
Show file tree
Hide file tree
Showing 5 changed files with 1,027 additions and 103 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -45,3 +45,4 @@ build

# CLion
.idea
cmake-build-*
15 changes: 13 additions & 2 deletions CMakeLists.txt
Expand Up @@ -16,6 +16,7 @@ dmlccore_option(USE_HDFS "Build with HDFS support" OFF)
dmlccore_option(USE_AZURE "Build with AZURE support" OFF)
dmlccore_option(USE_S3 "Build with S3 support" OFF)
dmlccore_option(USE_OPENMP "Build with OpenMP" ON)
dmlccore_option(USE_CXX14_IF_AVAILABLE "Build with C++14 if the compiler supports it" OFF)

# include path
include_directories("include")
Expand Down Expand Up @@ -73,7 +74,10 @@ if(MSVC)
else(MSVC)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" SUPPORT_CXX11)
if(USE_CXX14_IF_AVAILABLE)
check_cxx_compiler_flag("-std=c++14" SUPPORT_CXX14)
endif()
check_cxx_compiler_flag("-std=c++11" SUPPORT_CXX11)
check_cxx_compiler_flag("-std=c++0x" SUPPORT_CXX0X)
check_cxx_compiler_flag("-msse2" SUPPORT_MSSE2)
set(CMAKE_C_FLAGS "-Wall -Wno-unknown-pragmas -fPIC")
Expand All @@ -84,11 +88,18 @@ else(MSVC)
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif()
if(SUPPORT_CXX0X)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c++0x")
endif()
if(SUPPORT_MSSE2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
endif()
set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
if(SUPPORT_CXX11)
if(SUPPORT_CXX14)
add_definitions(-DDMLC_USE_CXX14=1)
add_definitions(-DDMLC_USE_CXX11=1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
elseif(SUPPORT_CXX11)
add_definitions(-DDMLC_USE_CXX11=1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(SUPPORT_CXX0X)
Expand Down

0 comments on commit 2777ad9

Please sign in to comment.