CMake TBBBuild

CMake TBBBuild

I just updated to the latest TBB source release and started using the new CMake support files, primarily calling tbb_build to build the library.  Initially, however, I found dismal performance and completely serialized behaviour was the result.  After hacking around I managed to turn on make's verbose setting (it would be nice if there was an easy and documented way to do this in tbb_build's interface), and I discovered that -std=c++11 was not being passed to the compiler.  Using CMake's normal mechanism for choosing the language standard didn't work, so I ended up adding this to MAKE_ARGS:

CXXFLAGS=-std=c++11

This seems surprising considering that TBB now requires C++11, I believe.  Really I would prefer that it respect the usual CMake options, or at least (again) it should be a documented part of the tbb_build interface.

 

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.