[CMake] Cross platform Multi-threading switches

Jan Woetzel jw at woetzelweb.de
Mon Jul 10 10:11:19 EDT 2006


Sagnes, Frederic wrote:

>... library wants multi-threading switches added to the compiler's command line 
>

>(-pthread for GCC
>
Handle it as compiler flag or library.
gcc "-pthread" == -lpthread

>/MT for VS, ...). Is there a command for CMake that simply adds that switch ? I saw the FindThreads command, 
>  
>

SET(CMAKE_CXX_FLAGS ...
or
SET_SOURCE_FILES_PROPERTIES( ... PROPERTIES OMPILE_FLAGS  ...
should help you.

Jan.

-- 

  Dipl.-Ing. Jan Woetzel
--------------------------------------------------
  Uni Kiel
  Institut f. Informatik und Praktische Mathematik
  Hermann-Rodewaldstr. 3  [Raum 310]
  24098 Kiel/Germany
--------------------------------------------------
  Tel    +49-431-880-4477
  Fax    +49-431-880-4054
  Privat +49-431-802872
  Mob.   +49-179-2937346
--------------------------------------------------
  Url    www.mip.informatik.uni-kiel.de/~jw
  Email  jw at mip.informatik.uni-kiel.de
  Privat jw at WoetzelWeb.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060710/063351c2/attachment.html


More information about the CMake mailing list