Skip to content

Commit a1ed1df

Browse files
committed
-pthread flag doesn't apply to windows
1 parent 799a818 commit a1ed1df

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/CMakeLists.txt

+8-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ else()
4444
)
4545
endif()
4646

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

4949
# CMake 3.14+
5050
include(FetchContent)
@@ -66,8 +66,13 @@ add_executable(verifier_test
6666
${CMAKE_CURRENT_SOURCE_DIR}/refcode/lzcnt.c
6767
)
6868

69-
target_link_libraries(chiavdf PRIVATE ${GMP_LIBRARIES} ${GMPXX_LIBRARIES} -pthread)
70-
target_link_libraries(verifier_test ${GMP_LIBRARIES} ${GMPXX_LIBRARIES} -pthread)
69+
target_link_libraries(chiavdf PRIVATE ${GMP_LIBRARIES} ${GMPXX_LIBRARIES})
70+
target_link_libraries(verifier_test PRIVATE ${GMP_LIBRARIES} ${GMPXX_LIBRARIES})
71+
72+
if(UNIX)
73+
target_link_libraries(chiavdf PRIVATE -pthread)
74+
target_link_libraries(verifier_test PRIVATE -pthread)
75+
endif()
7176

7277
if(BUILD_CHIAVDFC)
7378
add_library(chiavdfc_shared SHARED

0 commit comments

Comments
 (0)