
17 Apr
2006
17 Apr
'06
8:10 p.m.
Boris wrote:
Where does BOOST_HAS_THREADS come from? I see a source code comment in /boost/config/win32.hpp (I'm on Windows) mentioning BOOST_HAS_THREADS but no definition?
BOOST_HAS_THREADS is defined automatically when _MT is defined; most Windows compilers define _MT when their multithreaded runtime library is selected.
But after having glanced over /boost/config/user.hpp the right thing is probably to define BOOST_DISABLE_THREADS to get rid of all synchronization?
Yes, this would work. BOOST_DISABLE_THREADS is a user macro that causes BOOST_HAS_THREADS to not be defined, regardless of whether the platform is detected to support multiple threads. The configuration macros are described in http://www.boost.org/libs/config/config.htm