<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 1, 2019 at 4:55 PM Donald MacQueen [|] <<a href="mailto:dmacq@instantiations.com">dmacq@instantiations.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p><br>
    </p>
    <div class="gmail-m_-2300960438913980262moz-cite-prefix">On 1/1/2019 4:48 PM, frodak17 wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr"><br>
        <div class="gmail_quote">
          <div><br>
          </div>
          <div>I'm trying to follow along but you are calling cmake to
            do the install and set everything up before you run ctest.</div>
          <div>And that the software was already built and packaged
            separately.</div>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>No. CMakelists.txt does nothing but download the correct
      installer (32 or 64 bit) from our server, set a bunch of
      variables, and then run CTest.  I invoke the InstallShield
      installer from a command line in a CTest.</p>
    <p>There is no project, no make, no compile, no build. Just set a
      bunch of variables and run CTest.<br>
    </p>
    <p>I think from what Kyle said I need to migrate(?) this to a script
      that can be called from CTest directly, e.g., ctest -D
      Experimental -S cdash.txt.</p>
    <p>Thanks for the reply.<br>
    </p>
    <div id="gmail-m_-2300960438913980262DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><table style="border-top:1px solid rgb(211,212,222)"><tbody><tr><td style="width:55px;padding-top:13px"><br></td></tr></tbody></table></div></div></blockquote><div><br></div><div>The point I was trying to make is that the mere existence of a CMakeLists.txt is enough for the implicit try_compile() <br></div><div><br></div><div>For example use the following lines:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>cmake_minimum_required(VERSION 2.8.8)<br>if(CMAKE_VERSION VERSION_GREATER "3.1")<br>   cmake_policy(SET CMP0054 NEW)<br>endif()<br></div></blockquote><div><br></div><div>Now go into the build folder and type `cmake ..` and it will default with an implicit project with C and C++ languages enabled.</div><div>Then it will use the default generator and try to build the sample project to verify a working build system.<br></div><div>After this it will continue to process the rest of the script.</div><div><br></div><div>Now it may be that I misunderstood which log you were referring to that contained the error.</div><div>But typically any time `cmake` is used (unless used with -P or -E) it will do an implicit build unless something like "project( empty LANGUAGES NONE )" is used.<br></div><div><br></div><div>BTW:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "64")<br>
     set (vasttst_isX86_OS FALSE)<br>
     set (vasttst_OsBitness 64)<br>
endif()<br>
     set (vasttst_isX86_OS TRUE)<br>
     set (vasttst_OsBitness 86)<br>
endif ()

</blockquote><div>has a syntax error, it should be else()</div><div><br></div><div>As for the error in question<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
 The system cannot find 
the file specified. <br></div><div>CMake Error: Generator: execution of make failed. <br>
Make command was: "nmake" "/nologo" "-i"

</div></blockquote><div><br></div><div>This error is generated when "cmake --build" is used. <br></div><div>Using a CMakeLists.txt file with no targets, like the one above, then the following steps can be used to generate the error.</div><div><br></div><div>1) Open a VS Native Tools Command shell<br></div><div>2) Run:  cmake -G"NMake Makefiles" ..\no_targets</div><div>-- This is enough to setup the cache to a working nmake</div><div>3) Open a regular cmd.exe shell</div><div>4) Run: cmake --build . -- -i</div><div>The system cannot find the file specified<br>CMake Error: Generator: execution of make failed. Make command was: "nmake" "/nologo" "-i"<br></div></div><div class="gmail_quote"><br></div><div class="gmail_quote">As for suppressing these steps the only way I am aware of them occurring is if the test itself is trying to build either through issuing a `ctest --test-and-build` or `cmake --build`.</div><div class="gmail_quote">Doesn't the log file mention which test generated the error?  For example when running the tests for cmake there is a file called LastTest.log.  It contains details on all the tests and their results.</div><div class="gmail_quote"><br></div><div class="gmail_quote">I don't think simply running a script is sufficient to use ctest because it seems to need a configured build directory that contains the test configuration file before running the tests.<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">--</div><div class="gmail_quote">F<br></div></div><div dir="ltr"><br><div class="gmail_quote"><div><br></div></div></div></div></div></div></div></div></div>