diff options
author | Zachary Michaels <mikezackles@gmail.com> | 2014-06-11 13:15:23 -0400 |
---|---|---|
committer | Zachary Michaels <mikezackles@gmail.com> | 2014-06-11 13:15:23 -0400 |
commit | e84f39ae54f4f6715b2ef68d6a12b18d89df722d (patch) | |
tree | 7aabed7e9507d537c5978eaf5a17a5dbb7859efa /CMakeLists.txt | |
parent | Gcc 4.9 LTO fix (diff) | |
download | monero-e84f39ae54f4f6715b2ef68d6a12b18d89df722d.tar.xz |
Link to pthreads on non-apple unix
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b1e61a51..86a5267b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ function(set_static_flags) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++") endif() endfunction(set_static_flags) - + include_directories(src contrib/epee/include external "${CMAKE_BINARY_DIR}/version") if(APPLE) @@ -21,6 +21,11 @@ endif() set(STATIC ${MSVC} CACHE BOOL "Link libraries statically") +if (UNIX AND NOT APPLE) + # Note that at the time of this writing the -Wstrict-prototypes flag added below will make this fail + find_package(Threads REQUIRED) +endif() + if(MSVC) add_definitions("/bigobj /MP /W3 /GS- /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /DGTEST_HAS_TR1_TUPLE=0 /FIinline_c.h /D__SSE4_1__") # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Dinline=__inline") |