Skip to content

Commit

Permalink
-pthread flag doesn't apply to windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender committed Mar 7, 2024
1 parent 799a818 commit a1ed1df
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ else()
)
endif()

set (CMAKE_CXX_FLAGS "-std=c++1z")
set (CMAKE_CXX_FLAGS "-std=c++17")

# CMake 3.14+
include(FetchContent)
Expand All @@ -66,8 +66,13 @@ add_executable(verifier_test
${CMAKE_CURRENT_SOURCE_DIR}/refcode/lzcnt.c
)

target_link_libraries(chiavdf PRIVATE ${GMP_LIBRARIES} ${GMPXX_LIBRARIES} -pthread)
target_link_libraries(verifier_test ${GMP_LIBRARIES} ${GMPXX_LIBRARIES} -pthread)
target_link_libraries(chiavdf PRIVATE ${GMP_LIBRARIES} ${GMPXX_LIBRARIES})
target_link_libraries(verifier_test PRIVATE ${GMP_LIBRARIES} ${GMPXX_LIBRARIES})

if(UNIX)
target_link_libraries(chiavdf PRIVATE -pthread)
target_link_libraries(verifier_test PRIVATE -pthread)
endif()

if(BUILD_CHIAVDFC)
add_library(chiavdfc_shared SHARED
Expand Down

0 comments on commit a1ed1df

Please sign in to comment.