[CMake] Re: 'make test' doesn't build cppunit test executable

apervukh at minet.uni-jena.de apervukh at minet.uni-jena.de
Fri Mar 30 09:54:59 EST 2007


> Anton Pervukhin wrote:
>> Hi Bill
>>
>>
>>> I can not figure it out from the output you have posted.  I suggest
>>> that
>>> you make a very small contained
>>> example that I can try.   A tar file with all the sources needed to see
>>> the problem.  I will take a look
>>> at it if you can create that.
>>>
> This will fix your problem:
>
> diff -r sandboxlib-0.1.0-Source/CMakeLists.txt
> ../sandboxlib-0.1.0-Source/CMakeLists.txt
> 4a5
>  > enable_testing()
> 42c43
> <     --build-makeprogram ${CMAKE_MAKE_MAKEPROGRAM}
> ---
>  >     --build-makeprogram ${CMAKE_MAKE_PROGRAM}
>

yep, setting --build-makeprogram to correct variable solved the problem
(enable_testing() was already set in sandboxlib). I made a typo while
setting it :-) In CMake sources the Sources/CMakeLists.txt contains
--build-generator and --build-makeprogram as ${CMAKE_TEST_GENERATOR} and
${CMAKE_TEST_MAKEPROGRAM}. Those variables are set in main CMakeLists.txt.
First, I haven't not done this and got seg fault. That was because ctest
version 2.4.3, I was using, didn't report an error if generator was null.
After updating ctest to 2.4.5., the error about generator was there, so I
changed it and by --build-makeprogram made a typo.

> Please create a bug that ctest --build-and-test should report an error
> if the --build-makeprogram option is given an empty string.

Done.

Thank you very much for the help!
cheers, Anton



More information about the CMake mailing list