On Tue, Jan 1, 2019 at 4:55 PM Donald MacQueen [|] <dm...@instantiations.com> wrote:
> > On 1/1/2019 4:48 PM, frodak17 wrote: > > > > I'm trying to follow along but you are calling cmake to do the install and > set everything up before you run ctest. > And that the software was already built and packaged separately. > > > 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. > > There is no project, no make, no compile, no build. Just set a bunch of > variables and run CTest. > > 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. > > Thanks for the reply. > > The point I was trying to make is that the mere existence of a CMakeLists.txt is enough for the implicit try_compile() For example use the following lines: cmake_minimum_required(VERSION 2.8.8) > if(CMAKE_VERSION VERSION_GREATER "3.1") > cmake_policy(SET CMP0054 NEW) > endif() > Now go into the build folder and type `cmake ..` and it will default with an implicit project with C and C++ languages enabled. Then it will use the default generator and try to build the sample project to verify a working build system. After this it will continue to process the rest of the script. Now it may be that I misunderstood which log you were referring to that contained the error. 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. BTW: > if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "64") > set (vasttst_isX86_OS FALSE) > set (vasttst_OsBitness 64) > endif() > set (vasttst_isX86_OS TRUE) > set (vasttst_OsBitness 86) > endif () has a syntax error, it should be else() As for the error in question > The system cannot find the file specified. > CMake Error: Generator: execution of make failed. > Make command was: "nmake" "/nologo" "-i" > This error is generated when "cmake --build" is used. Using a CMakeLists.txt file with no targets, like the one above, then the following steps can be used to generate the error. 1) Open a VS Native Tools Command shell 2) Run: cmake -G"NMake Makefiles" ..\no_targets -- This is enough to setup the cache to a working nmake 3) Open a regular cmd.exe shell 4) Run: cmake --build . -- -i The system cannot find the file specified CMake Error: Generator: execution of make failed. Make command was: "nmake" "/nologo" "-i" 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`. 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. 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. -- F
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake