[CMake] ctest script: how to get make program

David Cole david.cole at kitware.com
Thu Mar 15 11:08:42 EDT 2012


The cross platform equivalent of:

  make install -i

is:

  cmake --build . --target install


On Thu, Mar 15, 2012 at 5:28 AM, Olivier Pierard
<olivier.pierard at cenaero.be> wrote:
> Dear all,
>
> At the end of my ctest script (I'm using cmake 2.8.0), I perform a 'make
> install' with an 'execute_process' command:
>
> execute_process(COMMAND "make" "install" "-i" WORKING_DIRECTORY
> ${CTEST_BINARY_DIRECTORY} RESULT_VARIABLE makeInstallResult
> OUTPUT_VARIABLE makeInstallLog ERROR_VARIABLE makeInstallLog)
>
> However, 'make' should be replaced by the cmake cache variable
> 'CMAKE_MAKE_PROGRAM' for portability.
>
> I tried, without success to use the get_cmake_property / get_property
> functions.  Would it be possible to have an example on how to use this ?
>
> By the way, I'm surprised that there is no 'ctest_install' command
> (instead of using the command above) after compilation/tests ?  Is it
> intended or am I missing something ?
>
> Thanks for your help,
>
> Olivier
>
> --
>
> *
> *
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list