Skip to content

Commit

Permalink
modified build rules for OSX, no pthread dependency needed
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickfrey committed Jun 1, 2018
1 parent 807d541 commit 90b67e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/build_rules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_WIN32_WINNT=0x0504")
else()
set( CMAKE_THREAD_PREFER_PTHREAD TRUE )
find_package( Threads REQUIRED )
if( NOT APPLE )
if(CMAKE_USE_PTHREADS_INIT)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread" )
endif()
endif( NOT APPLE )
endif()

string( REGEX MATCH "\\-std\\=c\\+\\+[1-7]+" SET_STD_CXX_11 "${CMAKE_CXX_FLAGS}" )
Expand Down

0 comments on commit 90b67e0

Please sign in to comment.