Skip to content

Commit

Permalink
clang on mac doesn't seem to want -pthread
Browse files Browse the repository at this point in the history
  • Loading branch information
Andersbakken committed Mar 28, 2017
1 parent 9549bcc commit 7b651d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compiler.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
include(CheckCXXCompilerFlag)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpointer-arith -Wnon-virtual-dtor -Wshadow -Wformat -pthread")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpointer-arith -Wnon-virtual-dtor -Wshadow -Wformat")
if (NOT RCT_RTTI_ENABLED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
endif ()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wpointer-arith -Wshadow -Wformat -pthread")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wpointer-arith -Wshadow -Wformat") # -pthread")
if (CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
Expand All @@ -17,6 +17,8 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_definitions(-D_DARWIN_UNLIMITED_SELECT)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
if (NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
# Use pic instead of PIC, which produces faster and smaller code,
# but could eventully lead to linker problems.
Expand Down

0 comments on commit 7b651d4

Please sign in to comment.