Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For VS releases 2008 and earlier.... (Except VS6 it uses msdev) </p> <p>Well digging more into cmake I will say this someone with more knowledge will be able to take this and run with it.</p> <p>I did find that the CL and LINK commands really do nothing since this just kicks off Devenv for VS2003 to 2008 and MSBuild for VS2010. Changing CL to NMCL will not matter since MSBuild uses the targets files which is why my other answer needs the user files modified. And why we need to use another tool here.</p> <p>Devenv called with /Build internally uses the project files to know what source files need to be built. It will then call createprocess internally to spawn CL and LINK as needed. This is why changing CL to NMCL in the cmake files is useless.</p> <p>Luckily we have another tool that can be used here....</p> <p>We need to change //make program CMAKE_MAKE_PROGRAM:FILEPATH=C:/Program Files (x86)/Common Files/Micro Focus/NMShared/CTI/11.1/NMdevenv.EXE</p> <p>and CMAKE_BUILD_TOOL:INTERNAL=e:/PROGRA~1/MICROS~2.0/Common7/IDE/devenv.com</p> <p>to C:/Program Files (x86)/Common Files/Micro Focus/NMShared/CTI/11.1/NMdevenv.EXE</p> <p>Now this is where someone with a little more knowledge is needed. We also need to pass the type of instrumentation to nmdevenv as the 1st parameters. </p> <p>I believe it can be done something like this </p> <p>set(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} " /nmon")</p> <p>One other issue here is that we need devenv to be in the path as well so the Path env variable will need to be set correctly as well. This can be done by running the correct vscvars bat file.</p> <p>Hope this helps and if you are using vs2008 and previous please add the steps needed to what I started here. I am sure it will help other users in the long run. If I get some more time to investigate this I will find the way to do it.</p> <p><em><strong>Edit</em></strong> Well I did manage to get this working with VS2008. I did have to make a change to our nmdevenv wrapper as cmake was trashing our SearchPath functionality. </p> <p>Here is what I did. Replaced the make program as above Ran VCVars32 Ran cmake --build mytestproj Ran the program under BounsChecker</p> <p>Now I switched to pass in /nmtxon for performance profiling This had me stumped for a bit as it kept compiling for Error Detection </p> <p>And that is when I found this in the converted project files</p> <pre><code> &lt;Tool Name="VCCLCompilerTool" AdditionalOptions=" /NMbcon /Zm1000" </code></pre> <p>Changed that to <p>and all is well. I had my performance compiled option. </p> <p>So I went back and modified this line in the CMakeCache.txt file opened the GUI, configue, generate //Flags used by the compiler during all build types. CMAKE_CXX_FLAGS:STRING= /NMbcon /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR</p> <p>Then the project was switched back to use /NMbcon. So that is the correct spot to put the switch if you want to compile all with us. Otherwise use the appropriate Debug or release line. </p> <hr> <p>portion of Cmake output Notice Instrumenting in the output</p> <pre><code>Microsoft (R) Visual Studio Version 9.0.30729.1. Copyright (C) Microsoft Corp. All rights reserved. 1&gt;------ Build started: Project: Test, Configuration: Debug Win32 ------ 1&gt;Compiling... New Command line nmcl.exe /NMtxon @e:\cust\Test3\Test\Test.dir\Debug\RSP0000011 2568792.rsp /nologo /errorReport:queue 1&gt;Test3.cpp 1&gt;Instrumenting ..\Test3\Test3.cpp 1&gt;Compiling manifest to resources... 1&gt;Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385 1&gt;Copyright (C) Microsoft Corporation. All rights reserved. 1&gt;Linking... </code></pre> <hr> <p>In summary</p> <p>Use Cmake to generate the CMakeCache.txt and directories Modify CmakeCahe Use NMDevenv as the MAKE program Add /NMon switch to the flags run CmakeGui and generate again</p> <p>Run VCVars32 Run cmake --build file</p> <p>Run the program under devpartner</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload