mirror of https://github.com/AlexeyAB/darknet.git
[clang] force -pthread flag on linux to avoid some cmake bugs
This commit is contained in:
parent
751d750952
commit
c35c94798a
|
@ -100,6 +100,9 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||
endif()
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
if (UNIX AND NOT APPLE)
|
||||
set(CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}") #force pthread to avoid bugs in some cmake setups
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-writable-strings ${CMAKE_CXX_FLAGS}")
|
||||
string(REGEX REPLACE "-O0" "-Og" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
||||
string(REGEX REPLACE "-O3" "-Ofast" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
|
||||
|
|
Loading…
Reference in New Issue