且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CMake - 使用英特尔编译器生成Visual Studio项目

更新时间:2023-11-09 14:58:28

The situation is not that good at the moment. After much googling, I've managed to find the following thread on the mailing list. It turns out that I'm not the only one struggling with the problem.

For the time being there is no easy solution, as:

  • cmake does not have a generator that would give the result out of the box
  • it seems that there is currently no way to do post-generate tasks with cmake

As a quick fix I can do the following:

  • generate the VS solution and then use the one-click Intel Conversion tool (automatisation gone)
  • write some shell scripts to do the conversion - a bit ugly

Update: Doing the project conversion in the post-generate task is a bit of a hack. I started to think about modifying the existing Visual Studio generator(s) to be able to create the right structure. The structure itself does not differ much from the typical solution:

  • New .icproj files are introduced between the solution and VS project level. They wrap the VS project and correspond to the blue thingy on the screenshot.
  • Original .vcproj remain unchanged. They are being referenced (by GUID and name) in the .icproj files
  • Unique references to .vcproj files in the solution .sln definition are replaced with the references to .icproj files. The project type is changed as well to a Intel Project specific constant GUID.

Update 2: Check the bug tracker.