mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 20:05:31 +00:00
No need for pthread lib in examples and tests
This commit is contained in:
parent
45db14ebd7
commit
e562f51f63
@ -56,6 +56,10 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set(warning_options /W4 /wd4503 /wd4512)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(add_link_deps pthread)
|
||||
endif()
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_subdirectory(lint)
|
||||
|
@ -3,10 +3,10 @@ include_directories(..)
|
||||
add_compile_options(${cxx11_options} ${warning_options})
|
||||
|
||||
add_executable(calc calc.cc)
|
||||
target_link_libraries(calc pthread)
|
||||
target_link_libraries(calc ${add_link_deps})
|
||||
|
||||
add_executable(calc2 calc2.cc)
|
||||
target_link_libraries(calc2 pthread)
|
||||
target_link_libraries(calc2 ${add_link_deps})
|
||||
|
||||
add_executable(calc3 calc3.cc)
|
||||
target_link_libraries(calc3 pthread)
|
||||
target_link_libraries(calc3 ${add_link_deps})
|
||||
|
@ -3,6 +3,6 @@ include_directories(..)
|
||||
add_compile_options(${cxx11_options} ${warning_options})
|
||||
|
||||
add_executable(test-main test.cc)
|
||||
target_link_libraries(test-main pthread)
|
||||
target_link_libraries(test-main ${add_link_deps})
|
||||
|
||||
add_test(TestMain test-main)
|
||||
|
Loading…
Reference in New Issue
Block a user