Hi Raffi, Am Wednesday 18 November 2015, 10:20:30 schrieb Raffi Enficiaud:
Le 17/11/15 17:06, Robert Ramey a écrit :
f) CMake can't run a compile only test - or even more difficult - a compile test which has to fail - without some CMake gymnastics. At 67 I don't go in for gymnastics so much any more. Bjam handles this easily.
I can also say the same (although I am not yet 67). I do not want to learn a new language, especially when the languages I know are expressive enough for the tasks I am doing.
BTW, what you mention should be easily achieved with try_compile/try_run - https://cmake.org/cmake/help/v3.0/command/try_compile.html - https://cmake.org/cmake/help/v3.0/command/try_run.html
Those commands are meant for feature detection. Robert meant "compile- fail"/"compile" and "link-fail"/"link" unit test rules, analogues to the "add- test" function for executables. With all bells and whistles, of course. That means they should show up in the statistics, show in the CDash dasbboard etc. pp. Setting up even normal tests usually means writing some boilerplate cmake code. Compare [ run-test foo.cpp ] with add_executable( foo foo.cpp ) add_test(foo foo) not mentioning setting up dll paths on windows and whatnot. I think that cmake 3(.4) has at least solved some of the dependency issues by borrowing the "usage-requirements" from Boost.Build. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany