| title | /PROFILE (Performance Tools Profiler) | ||
|---|---|---|---|
| description | Learn more about: /PROFILE (Performance Tools Profiler) | ||
| ms.date | 10/13/2021 | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
Produces an output file that can be used with the Performance Tools profiler.
/PROFILE
/PROFILE implies the following linker options:
/PROFILE is used to support the Performance Tools for Visual Studio Profiler utility VSInstr.exe.
-
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
-
Select the Configuration Properties > Linker > Advanced property page.
-
Modify the Profile property.
- See xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.Profile%2A.
Because a CMake project doesn't have the usual Property Pages support, the linker option can be set by modifying the CMakeLists.txt file.
-
Open the
CMakeLists.txtfile in the project root directory. -
Add the code below. For more information, see the CMake
set_target_propertiesdocumentation.SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/PROFILE") -
Rebuild your solution.