All: Clean up pthreads in CMakeList
Jeffrey Pfau jeffrey@endrift.com
Fri, 20 Feb 2015 23:18:18 -0800
1 files changed,
4 insertions(+),
2 deletions(-)
jump to
M
CMakeLists.txt
→
CMakeLists.txt
@@ -110,8 +110,10 @@ list(APPEND OS_LIB ws2_32)
file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/windows/*.c) source_group("Windows-specific code" FILES ${OS_SRC}) else() - add_definitions(-DUSE_PTHREADS -D_GNU_SOURCE) - list(APPEND OS_LIB pthread) + add_definitions(-DUSE_PTHREADS) + if(NOT APPLE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") + endif() file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/posix/*.c) source_group("POSIX-specific code" FILES ${OS_SRC}) endif()