CMake - Generating Visual Studio project using Int

2019-03-31 06:35发布

Is there a simple (or hack) way to generate a Visual Studio 2008 project that uses Intel Compiler from cmake?

I have found some notes about using ICProjConvert. Does anyone have any scripts or CMake snippets that are proven to work?

Here's the screenshot of the final solution I'd like to obtain. Note that it contains Intel Compiler projects: alt text http://img156.imageshack.us/img156/370/screenau.png

1条回答
乱世女痞
2楼-- · 2019-03-31 07:15

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.

查看更多
登录 后发表回答