On 6/8/10 3:54 AM, Cadio Nicolas (Creative Ingenierie) wrote:

Hi,

I work on a C/C++ project where we use the library POSIX thread (pthread).

We use two compiler (x86_64-redhat-linux and x86_64-unknown-linux-gnu).

When I compile the project with the redhat compiler, cmake adds automatically the option --lpthread to the command line of the compilation

BUT when I use the unknown compiler, cmake doesn't add this option.

I don't understand why cmake doesn't add the --lpthread option with the x86_64-unknown-linux-gnu.

Anybody can help me please to resolve my problem ?

Thanks, nico

Are you using the find_package(Threads) command to find the library required for threads? You should not depend on the compiler to automatically add that option - if you want threads, use the find module.

Ryan

--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com/

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to