You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake

8 lines
383 B

set(unitybuild_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0_c.c")
file(STRINGS ${unitybuild_c} unitybuild_c_strings)
string(REGEX MATCH ".*#include.*s3.c.*#include.*s1.c.*#include.*s2.c.*" matched_code ${unitybuild_c_strings})
if(NOT matched_code)
set(RunCMake_TEST_FAILED "Generated unity file doesn't include expected oder of source files")
return()
endif()