Skip to content

Commit 89a6dd5

Browse files
committed
Don't set pthread flag on MSVC
1 parent 0b20fdc commit 89a6dd5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ else()
9999
set_cxx_flag("-g3" DEBUG)
100100
set_cxx_flag("-g3" RELWITHDEBINFO)
101101

102+
set_cxx_flag("-pthread")
103+
set_linker_flag("-pthread")
104+
102105
if (USE_EXTRA_OPTIMIZATION)
103106
# CMake already sets the -O3 flag on Release build and -O[1-3s] already sets the -fomit-frame-pointer flag.
104107
set_cxx_flag("-Og" DEBUG)
@@ -122,8 +125,6 @@ else()
122125
endif()
123126

124127
if (BUILD_SHARED_LIBCRN OR BUILD_STATIC_LIBCRN OR BUILD_CRUNCH OR BUILD_EXAMPLES)
125-
set_cxx_flag("-pthread")
126-
set_linker_flag("-pthread")
127128
add_subdirectory(crnlib crnlib)
128129
endif()
129130

0 commit comments

Comments
 (0)