使用CMake,C ++和Visual Studio 2012进行分析 [英] Profiling with CMake, C++, and Visual Studio 2012

查看:306
本文介绍了使用CMake,C ++和Visual Studio 2012进行分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用CMake 2.8.10.1来为Visual Studio 2012 Ultimate(64位)生成项目文件。生成的解决方案包含一个库,一些测试和一些可执行文件。

I am using CMake 2.8.10.1 to generate project files for Visual Studio 2012 Ultimate (64-bit). The resulting solution contains a library, some tests, and some executables.

我想分析一些应用程序。当我选择ANALYZE - >开始性能分析时,我遇到错误消息没有可启动项目可用于性能分析。我如何配置我的CMake生成的解决方案?

I would like to profile some of the applications. When I select "ANALYZE" -> "Start Performance Analysis," I encounter the error message "No launchable projects are available for profiling." How can I profile my solution generated by CMake?

推荐答案

看来我找到一种方法来解决它。您需要在您的项目下添加win32配置。然后profiler将看到您的项目可启动。
例如,对于发布配置,您应该添加以下

It seems I've found a way to fix it. You need to add win32 configuration under your project. Then profiler will see your project as launchable. For example, for the release configuration you should add the following

<ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
</ProjectConfiguration> 

<ItemGroup Label="ProjectConfigurations">

这篇关于使用CMake,C ++和Visual Studio 2012进行分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆