зеркало из https://github.com/microsoft/napajs.git
Fix unittest build break in Clang (#189)
This commit is contained in:
Родитель
8f6b8b2efb
Коммит
0c7355f887
|
@ -51,8 +51,9 @@ set_target_properties(${TARGET_NAME} PROPERTIES
|
|||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/build/test
|
||||
)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
# GCC: enable std::thread via -pthread option.
|
||||
# GCC/Clang: enable std::thread via -pthread option.
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
|
||||
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE Threads::Threads)
|
||||
|
|
Загрузка…
Ссылка в новой задаче