3 include(CheckSourceRuns)
5 set(C 1) # test that this is tolerated
7 check_source_runs(C "int main() {return 2;}" SHOULD_FAIL)
9 message(SEND_ERROR "C check_source_runs succeeded, but should have failed.")
12 check_source_runs(C "int main() {return 0;}" SHOULD_RUN)
14 message(SEND_ERROR "C check_source_runs failed for valid C executable.")