AW: [CMake] Cross platform Multi-threading switches

Brad King brad.king at kitware.com
Tue Jul 11 11:33:36 EDT 2006


Sagnes, Frederic wrote:
> I thought CMake would have built-in support for multithreaded projects, as they are quite common.
> I'll set multi-threading switches for each compiler, but would it be a good idea to have a SET_TARGET_PROPERTIES extension that automatically adds multi-threaded attribute to targets, so that CMake would add the according compiler-specific switches?

We build many multithreaded projects with CMake.  The default build 
configuration generated for VS is multithreaded, IIRC.  See the 
FindThreads.cmake module for help in computing the proper threading flags.

Having a magic feature-to-flag map on each platform would be nice but is 
not currently implemented.

-Brad


More information about the CMake mailing list