Skip to content

Commit

Permalink
attempt to solve clang -pthread cotire issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Nov 13, 2017
1 parent f6f60e8 commit c6bb5d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion libs/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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":
#---------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions libs/hwdrivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c6bb5d3

Please sign in to comment.