unitybuild_skip-check.cmake 555 B

1234567891011121314
  1. set(unitybuild_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0_c.c")
  2. file(STRINGS ${unitybuild_c} unitybuild_c_strings)
  3. string(REGEX MATCH "\\/s[1-6].c" matched_files_1_6 ${unitybuild_c_strings})
  4. if(matched_files_1_6)
  5. set(RunCMake_TEST_FAILED "Generated unity contains s1.c -> s6.c which should have been skipped")
  6. return()
  7. endif()
  8. string(REGEX MATCH "\\/s[7-8].c" matched_files_7_8 ${unitybuild_c_strings})
  9. if(NOT matched_files_7_8)
  10. set(RunCMake_TEST_FAILED "Generated unity should have contained s7.c, s8.c!")
  11. return()
  12. endif()