Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

CMake project files

__m128i
ビギナー
1,193件の閲覧回数
Just downloaded the TBB 3.0 and trying to get started ... some small questions:
* Is there some work to allow building TBB with CMake? Right now, the project files don't work directly with VS 2010, which could be easily fixed by moving to CMake. There's also no FindTBB which works with the latest release, are there any plans for that?
* Is there any license change/clarification planned? I've seen the discussions here on the forum as well as stuff like http://codesuppository.blogspot.com/2009/01/intels-giant-screw-up-with-intel.html, which makes me a bit curious. Do you plan to change it to something like BSD, or is rather unlikely?

Thanks!
0 件の賞賛
11 返答(返信)
Vladimir_P_1234567890
1,193件の閲覧回数
hi __m128i,

There are no contributions with CMake makefiles so far. But tbb can be build with vs2010 RC by converting existing projects in usual way. Are there any issues with this?

--Vladimir
__m128
ビギナー
1,193件の閲覧回数
Bah, messed up my login data, so that's still me here.

Yes, the problem is that the linker output is set to tbb_debug.dll for instance, instead of the target name, which makes VS 2010 emit tbb.dll and complain that the target name does not match the linker output (this affects only debug.)
Vladimir_P_1234567890
1,193件の閲覧回数
We had such problem with VS2010 beta2 but in RC tbb project files are converted with a warning and build successfully. Do you reproduce this with VS2010 RC?

--Vladimir

Blas_Rodriguez_Somoz
ビギナー
1,193件の閲覧回数
I'm preparing CMake project files for TBB for my own use, to be used on vs 2008, mingw32/64+eclipse and in the future macOSX.

Are the maintainers of TBB interested in a contribution of CMake project files ?

Alexey-Kukanov
従業員
1,193件の閲覧回数
Supporting CMake project files as the only way to build TBB would introduce the dependency on CMake which I'm afraid would not be liked by some users.

Supporting CMake in addition to makefiles and VS projects would add burden on the developers.

I would be interested to see if CMake can be used as a tool to produce all other "build scripts" (makefiles, VS projects, possibly XCode projects, etc.) in a "ready to redistribute" form, i.e. not having any dependencies on local configuration, paths, etc. If that were possible, I would consider migration to CMake,aswe would have single build configuration system to maintain while at the same time produce and redistribute makefiles etc. in ready-to-use form.
Blas_Rodriguez_Somoz
ビギナー
1,193件の閲覧回数
Let me say I'm not a CMake evangelist, I begun using it because it is needed for ITK, a image processing library that I need to use. At first I'hate it a bit, but after using it, now I think it is the best tool available for cross platform c projects.

In fact, when recently I need to transform a vs only project to cross-platform and I decide to use it.

With CMake you create a model of your project which need to be translated to a buildable project. The tool to do that are the generators of CMake, one for each platform and IDE or make tool. For instance, the generators for Windows are:
  • Borland makefiles
  • MSYS makefiles
  • MinGW makefiles
  • NMake makefiles
  • NMake makefiles JOM
  • Unix makefiles
  • Visual Studio 10
  • Visual Studio 10 Win64
  • Visual Studio 6
  • Visual Studio 7
  • Visual Studio 7 .NET 2003
  • Visual Studio 8 2005
  • Visual Studio 8 2005 Win64
  • Visual Studio 9 2008
  • Visual Studio 9 2008 Win64
  • Watcom WMake
  • CodeBlocks MinGW makefiles
  • CodeBlocks NMake makefiles
  • CodeBlocks Unix makefiles
  • Eclipse CDT4 MinGW makefiles
  • Eclipse CDT4 NMake makefiles
  • Eclipse CDT4 Unix makefiles
AFAIK buildable projects generated with CMake are not ready to be redistributed, you must distribute the cmake project, and let the final user generate the buildable project for his favorite IDE or make tool using CMake.

To generate buildable projects, CMake includes a GUI which let you choose the generator and set certain build values.

CMake has some features that make it very appealing, for instance by default generation is done outside the source tree, without polluting it. Due to this feature, it is very easy to work simultaneously on several buildable projects generated from one cmake project. For instance, I'm working on 4 tbb make projects simultaneously: vs 2008 32, vs 2008 64, eclipse cdt + mingw 32 and eclipse cdt + mingw 64.

Although I'm not an expert in CMake I'll try to help you if you want to know more.

Note: I've detected some simple corrections needed for MinGW64 support. Do you want it ?
Alexey-Kukanov
従業員
1,193件の閲覧回数
> AFAIK buildable projects generated with CMake are not ready to be redistributed, you must distribute the cmake project, and let the final user generate the buildable project for his favorite IDE or make tool using CMake.

That's how we understood it as well; so it seemsCMake does not suite our needs, because it would impose a 3rd party dependency.

> Note: I've detected some simple corrections needed for MinGW64 support. Do you want it ?

Yes. If you decide to contribute, please use the official TBB contribution page, rather than just posting to the forum. Thanks!
skn123
ビギナー
1,193件の閲覧回数
Hello Blas
Do you have any pointers to CMake versions of building TBB? If so I would be interested in hearing from you.
Thanks
klaim
ビギナー
1,193件の閲覧回数

I'm getting back to this because it's two years latter and CMake is the most used meta build system for open source c++ cross-platform software.
Other similar meta build system are available but CMake seems to cover the most grounds. It's even being used in the Rypl project to modularize Boost and provide a package management tool like gem for Ruby or pip for Python.

Now, would -today- the TBB team consider using CMake? I mean for a major version (which would be interface breaking anyway)

Alexey Kukanov (Intel) wrote:

> AFAIK buildable projects generated with CMake are not ready to be redistributed, you must distribute the cmake project, and let the final user generate the buildable project for his favorite IDE or make tool using CMake.

That's how we understood it as well; so it seemsCMake does not suite our needs, because it would impose a 3rd party dependency.

I think this is very misleading. The point of a meta build system is to abstract the edition tools used by the users so and focus on a unique definition of the project. Now recently there have been issues with projects definitions with Visual Studio partially because they have to be maintained with other systems.
Basically the point is to avoid bugs and also allow users to use IDEs you don't manage. 

Now the issue of not being able to generate a generic project file for all potential edition tools is actually not a legitimate one in the end.
I had exactly the same concern before beginning to use CMake, but it actually is a very minor nuisance as CMake is as simple to use as make (as a user)
as make, so once installed you tend to use it along with a lot of other projects.

Currently it's far more painful to have to setup different build scripts for different platforms inside my user code just so that I can use TBB. So I hope that you will consider using one meta build system (CMake or Premake for example) and kill the tons of pain the current project files generate.

Vladimir_P_1234567890
1,193件の閲覧回数

Hello klaim,

We do not want to invent a wheel so we do not want to write cmake files from scratch.  I know that several teams use cmake to build Intel TBB libraries in their projects. So in case somebody decides to contribute the cmake files using the official TBB contribution page then we can consider to add files to the package.

thanks!
--Vladimir 

klaim
ビギナー
1,193件の閲覧回数

Vladimir Polin (Intel) wrote:

We do not want to invent a wheel so we do not want to write cmake files from scratch.  I know that several teams use cmake to build Intel TBB libraries in their projects. So in case somebody decides to contribute the cmake files using the official TBB contribution page then we can consider to add files to the package.

thanks!
--Vladimir 

Thanks for answering.

I can try to provide a first iteration of such CMake configuration for TBB but I just need to know which current project file should I use as a guide to which file to use to configure how. Also, does the source archive contain sources that are never used?

I will not be able to check if the CMake script works with other generators than VS2012, but I think it would already be a good start.

 

返信