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:


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.


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

Hi Andrew, thank you for the feedback!

Currently the only way to pass the desired standard is MAKE_ARGS. You can pass custom arguments supported by TBB make-system (described in <tbb>/build/index.html) or/and other make-arguments. For standard there is an option "stdver":

tbb_build(TBB_ROOT <tbb> CONFIG_DIR <var> MAKE_ARGS stdver=c++11)

We will work on auto detection of the standard in CMake environment to use it during the TBB build. Moreover, we will work on improvement of debug capabilities for this module.

Best regards,

Leave a Comment

Please sign in to add a comment. Not a member? Join today