Skip to content

Commit facb432

Browse files
committed
Try another fix
1 parent d60abc9 commit facb432

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

example/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
2323
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Werror -Wall -Wextra -Weffc++ -Wswitch-default")
2424
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
2525
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything")
26-
set(CMAKE_LINK_FLAGS "${CMAKE_LINK_FLAGS} -lpthread")
2726
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
2827
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
2928
endif()
@@ -32,4 +31,8 @@ foreach (example ${EXAMPLES})
3231
add_executable(${example} ${example}/${example}.cpp)
3332
endforeach()
3433

34+
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
35+
target_link_libraries(parsebyparts pthread)
36+
endif()
37+
3538
add_custom_target(examples ALL DEPENDS ${EXAMPLES})

0 commit comments

Comments
 (0)