[CMake] parameters

Tyler Roscoe tyler at cryptio.net
Wed Mar 11 12:02:31 EDT 2009


On Wed, Mar 11, 2009 at 09:39:30AM +0200, larinus at gmail.com wrote:
> How can i specify  the following parameters in my CMakeLists.txt?
> cmake -DCMAKE_THREAD_LIBS:STRING="-pthread" -DCMAKE_USE_PTHREADS:BOOL=ON 
> -DCMAKE_EXE_LINKER_FLAGS:STRING="-pthread"

Maybe I don't understand the question but doesn't this work?:

set (CMAKE_THREAD_LIBS "-pthread")

However, you probably want to use TARGET_LINK_LIBS and friends instead
of trying to set linker flags "by hand".

hth,
tyler


More information about the CMake mailing list