[CMake] Compilation failure req'd for successful test
Walter E Brown
wb at fnal.gov
Tue Apr 26 10:54:32 EDT 2005
Hello,
As part of a project's testing, we need to ensure that a compilation
failure will correctly occur under specific circumstances. In
particular, we wish at ctest time:
- to compile (but not link) a specific program that we expect to fail
compilation, then
- to capture the detailed output of that compilation into a file, and
then
- to run some other program (perhaps a tool like grep or perhaps a
custom script) that inspects that attempted compilation's output for
certain characteristics of interest, and finally
- to indicate the success or failure of the test based on the results
of such inspection.
Alas, it is unclear to us how to set this up; neither the book nor the
online help seem on point. Can someone advise us, preferably with
sample cmake/ctest code that we can use as a model?
Thank you.
-- WEB
More information about the CMake
mailing list