<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 31, 2018 at 9:47 PM Donald MacQueen [|] via CMake <<a href="mailto:cmake@cmake.org">cmake@cmake.org</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">On 12/31/2018 4:38 PM, Kyle Edwards wrote:<br>
> On Mon, 2018-12-31 at 16:16 -0500, Donald MacQueen [|] via CMake wrote:<br>
>> First, CMake is quite impressive. Nice job.<br>
>><br>
>> I am using it in a non-standard way where I set a bunch of variables<br>
>> and<br>
>> then go straight to CTest thatI installs our software and then runs<br>
>> several hundred tests on it. The batch file looks like this:<br>
>><br>
>> rmdir /s/q build<br>
>> mkdir build<br>
>> cd build<br>
>> cmake -Dx64=%x64% -Doption:STRING="%opt%" ..<br>
>> ctest -D Experimental -S<br>
>><br>
>> I do not make or build or compile.<br>
>><br>
>> I recently hooked this up to a CDash server which is very handy. I<br>
>> want<br>
>> to get the results that are sent to CDash, currently from Windows<br>
>> only,<br>
>> to be all green.<br>
>><br>
>> However, I am a little curious about what you're doing in your use<br>
>> case. You say you're not building anything. Does your sofware exist in<br>
>> the form of scripts (Python, Perl, etc.), or are you downloading pre-<br>
>> built binaries from somewhere?<br>
<br>
The purpose here is to 1) test that the installation of our product is <br>
successful (all the files are there with the correct permissions, etc.) <br>
and 2) that the 13k+ tests we have run correctly after installation. <br>
The installer is created using Install Shield.<br>
<br>
My CMakelists.txt looks something like this:<br>
<br>
++++++++++++++++++++++++++++++++++++++++++++++++++<br>
<br>
cmake_minimum_required(VERSION 2.8.8)<br>
if(CMAKE_VERSION VERSION_GREATER "3.1")<br>
cmake_policy(SET CMP0054 NEW)<br>
endif()<br>
<br>
<br>
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 ()<br>
<br>
200 more lines..<br>
<br>
ENABLE_TESTING()<br>
<br>
include(CTest)<br>
<br>
add_subdirectory(test)<br>
<br>
++++++++++++++++++++++++++++++++++++++++++++++++++<br>
<br>
rmdir /s/q build<br>
mkdir build<br>
cd build<br>
ctest -D Experimental -S cdash.txt<br>
<br>
That way I avoid make/build/compile and go straight to CTest.<br>
<br>
Right?<br>
<br>
-- <br>
Donald [|]<br>
A bad day in [] is better than a good day in {}.<br>
<br>
<br></blockquote><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><br></div><div>> cmake -Dx64=%x64% -Doption:STRING="%opt%" .. <br></div><div><br></div><div>If the CMakeLists.txt file has the project() command in it that is enough to kick of an implicit build and look for a working compiler using the default generator.</div><div>I think you can work around this by using LANGUAGES NONE in the project() command.</div><div><br></div><div>Alternatively if CMakeLists.txt can be converted into a pure script without targets then you could run it as cmake -D... -P script_file.cmake</div><div>But I'm not sure if that is possible because at some point something makes the test configuration file and the tests need to be found somewhere.</div><div><br></div><div><br></div></div></div>