[CMake] Can't get CMake to link pthreads to my lib

Jean-Michaël Celerier jeanmichael.celerier at gmail.com
Tue Aug 8 10:31:30 EDT 2017


I've tried this and also
set(THREADS_PREFER_PTHREAD_FLAG TRUE)

but this didn't work either.



-------
Jean-Michaël Celerier
http://www.jcelerier.name

On Tue, Aug 8, 2017 at 4:01 PM, Rolf Eike Beer <eike at sf-mail.de> wrote:

> Am 2017-08-08 15:45, schrieb Jean-Michaël Celerier:
>
>> Here's my CMakeLists.txt :
>>
>>
>>>>>>>>>
>> cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
>> project(oscour)
>> set(CMAKE_INCLUDE_CURRENT_DIR ON)
>>
>> set(CMAKE_CXX_FLAGS "-fconcepts -fsanitize=address -fsanitize=undefined")
>> set(CMAKE_EXE_LINKER_FLAGS "-fconcepts -fsanitize=address
>> -fsanitize=undefined")
>>
>> add_subdirectory(uWebSockets)
>>
>
> set(CMAKE_THREAD_PREFER_PTHREAD On)
>
> find_package(Threads REQUIRED)
>>
>
> Greetings,
>
> Eike
> --
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170808/5bf1b1eb/attachment-0001.html>


More information about the CMake mailing list