Permalink
Browse files

attempt to solve clang -pthread cotire issues

  • Loading branch information...
jlblancoc committed Nov 13, 2017
1 parent f6f60e8 commit c6bb5d3b196016736102c6c36c50c4a0f86a38e5
Showing with 5 additions and 4 deletions.
  1. +2 −1 libs/base/CMakeLists.txt
  2. +3 −3 libs/hwdrivers/CMakeLists.txt
View
@@ -66,8 +66,9 @@ endif()
# We need pthread's in C files:
if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX) AND NOT WIN32)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
add_compile_options(-pthread)
endif()
#---------------------------------------------
# Macro declared in "DeclareMRPTLib.cmake":
#---------------------------------------------
@@ -157,9 +157,9 @@ define_mrpt_lib(
IF(BUILD_mrpt-hwdrivers)
# We need pthread's on unices
target_link_libraries(mrpt-hwdrivers
PRIVATE
Threads::Threads)
if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX) AND NOT WIN32)
add_compile_options(-pthread)
endif()
# Ignore precompiled headers in intersense sources:
IF(CMAKE_MRPT_HAS_INTERSENSE)

0 comments on commit c6bb5d3

Please sign in to comment.