CMake - Generating Visual Studio project using Intel Compiler

爱⌒轻易说出口 提交于 2020-01-01 06:42:08

问题


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:


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.



来源:https://stackoverflow.com/questions/2984121/cmake-generating-visual-studio-project-using-intel-compiler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!